From 2829e4ee311096c9221320eded9b4a1b0601e6dd Mon Sep 17 00:00:00 2001 From: sam marshall Date: Thu, 16 May 2019 17:08:12 +0100 Subject: [PATCH] MOBILE-2935 Dashboard blocks: Fix code review problems --- src/core/block/components/block/block.ts | 6 +++--- src/core/siteplugins/classes/handlers/block-handler.ts | 2 +- .../components/block/core-siteplugins-block.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/block/components/block/block.ts b/src/core/block/components/block/block.ts index 8f239a981..fffba5683 100644 --- a/src/core/block/components/block/block.ts +++ b/src/core/block/components/block/block.ts @@ -69,13 +69,13 @@ export class CoreBlockComponent implements OnInit, OnDestroy { // Block not supported, don't render it. But, site plugins might not have finished loading. // Subscribe to the observable in block delegate that will tell us if blocks are updated. // We can retry init later if that happens. - this.blockSubscription = this.blockDelegate.blocksUpdateObservable.subscribe({ - next: (): void => { + this.blockSubscription = this.blockDelegate.blocksUpdateObservable.subscribe( + (): void => { this.blockSubscription.unsubscribe(); delete this.blockSubscription; this.initBlock(); } - }); + ); return; } diff --git a/src/core/siteplugins/classes/handlers/block-handler.ts b/src/core/siteplugins/classes/handlers/block-handler.ts index ef16a70e2..8ee9dd059 100644 --- a/src/core/siteplugins/classes/handlers/block-handler.ts +++ b/src/core/siteplugins/classes/handlers/block-handler.ts @@ -33,7 +33,7 @@ export class CoreSitePluginsBlockHandler extends CoreSitePluginsBaseHandler impl * @param {Injector} injector Injector * @param {any} block Block data * @param {string} contextLevel Context level (not used) - * @param {number} instanceId Instance if (not used) + * @param {number} instanceId Instance id (not used) * @return {CoreBlockHandlerData|Promise} Data or promise resolved with the data */ getDisplayData(injector: Injector, block: any, contextLevel: string, instanceId: number): diff --git a/src/core/siteplugins/components/block/core-siteplugins-block.html b/src/core/siteplugins/components/block/core-siteplugins-block.html index 94fd9c04f..015e3dc49 100644 --- a/src/core/siteplugins/components/block/core-siteplugins-block.html +++ b/src/core/siteplugins/components/block/core-siteplugins-block.html @@ -1 +1 @@ - +