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;