mirror of https://github.com/logseq/logseq
chore(plugin): bump version
parent
d4a2082cce
commit
57079a9234
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@logseq/libs",
|
||||
"version": "0.0.1-alpha.6",
|
||||
"version": "0.0.1-alpha.7",
|
||||
"description": "Logseq SDK libraries",
|
||||
"main": "dist/lsplugin.user.js",
|
||||
"typings": "index.d.ts",
|
||||
|
|
|
@ -296,8 +296,6 @@ export function setupPluginUserInstance (
|
|||
}
|
||||
|
||||
if (window.__LSP__HOST__ == null) { // Entry of iframe mode
|
||||
debug('Entry of iframe mode.')
|
||||
|
||||
const caller = new LSPluginCaller(null)
|
||||
window.logseq = setupPluginUserInstance({} as any, caller)
|
||||
}
|
||||
|
|
|
@ -121,8 +121,12 @@ export function invokeHostExportedApi (
|
|||
...args: Array<any>
|
||||
) {
|
||||
const method1 = snakeCase(method)
|
||||
const fn = window.api[method1] || window.apis[method1] ||
|
||||
window.api[method] || window.apis[method]
|
||||
|
||||
// @ts-ignore
|
||||
const logseqHostExportedApi = window.logseq?.api || {}
|
||||
|
||||
const fn = logseqHostExportedApi[method1] || window.apis[method1] ||
|
||||
logseqHostExportedApi[method] || window.apis[method]
|
||||
|
||||
if (!fn) {
|
||||
throw new Error(`Not existed method #${method}`)
|
||||
|
|
Loading…
Reference in New Issue