diff --git a/src/plugin/request.md b/src/plugin/request.md index 487c1344f3d785978a99eb61f1ec94ca6b31904e..47daf4525b3873b10f93a87d75464e0e8cb97f13 100644 --- a/src/plugin/request.md +++ b/src/plugin/request.md @@ -9,7 +9,7 @@ Be it request the user to select a region, a point, navigate to a specific locat ```javascript let parentWindow -window.addEventListener('message', ev => { +window.addEventListener('message', msg => { const { source, data, origin } = msg const { id, method, params, result, error } = data diff --git a/src/plugin/service.ts b/src/plugin/service.ts index 19f183189fac54e16b9b5a33be58de632276327a..e4fe49a725535ac36d54daf87b4f79a0aae3f698 100644 --- a/src/plugin/service.ts +++ b/src/plugin/service.ts @@ -6,6 +6,7 @@ import { WidgetPortal } from "src/widget/widgetPortal/widgetPortal.component"; import { setPluginSrc, SET_PLUGIN_NAME } from "./const"; import { PluginPortal } from "./pluginPortal/pluginPortal.component"; import { environment } from "src/environments/environment" +import { startWith } from "rxjs/operators"; @Injectable({ providedIn: 'root' @@ -25,7 +26,9 @@ export class PluginService { 'siibra-explorer': true name: string iframeUrl: string - }[]>(`${environment.BACKEND_URL || ''}plugins/manifests`) + }[]>(`${environment.BACKEND_URL || ''}plugins/manifests`).pipe( + startWith([]) + ) async launchPlugin(htmlSrc: string){ if (this.loadedPlugins.includes(htmlSrc)) return