From e495d11ec5662939786e2186b8b316e2cfafec59 Mon Sep 17 00:00:00 2001 From: Gabriel Bodeen Date: Tue, 25 May 2021 00:14:23 +0200 Subject: [PATCH] Use dynamic label sample only when activated Signed-off-by: Gabriel Bodeen --- .../browser/label/sample-dynamic-label-provider-contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts b/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts index de3a3f507c137..b9b09f847a0ac 100644 --- a/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts +++ b/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts @@ -37,7 +37,7 @@ export class SampleDynamicLabelProviderContribution extends DefaultUriLabelProvi } canHandle(element: object): number { - if (element.toString().includes('test')) { + if (this.isActive && element.toString().includes('test')) { return 30; } return 0;