chore(plugin): bump version

pull/1901/head
charlie 2021-05-17 11:14:37 +08:00
parent d4a2082cce
commit 57079a9234
3 changed files with 7 additions and 5 deletions

View File

@ -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",

View File

@ -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)
}

View File

@ -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}`)