diff --git a/1st-gen/packages/overlay/src/slottable-request-directive.ts b/1st-gen/packages/overlay/src/slottable-request-directive.ts index 965a9e81bd3..ed4f0920874 100644 --- a/1st-gen/packages/overlay/src/slottable-request-directive.ts +++ b/1st-gen/packages/overlay/src/slottable-request-directive.ts @@ -74,7 +74,7 @@ export class SlottableRequestDirective extends AsyncDirective { { signal } ); - if (window.__swc.DEBUG) { + if (window.__swc?.DEBUG && window.__swc?.warn) { window.__swc.warn( undefined, `⚠️ WARNING ⚠️ : The Overlay Trigger Directive is experimental and there is no guarantees behind its usage in an application!! Its API and presence within the library could be changed at anytime. See "sp-overlay" or "Overlay.open()" for a stable API for overlaying content on your application.`, diff --git a/1st-gen/packages/overlay/src/slottable-request-event.ts b/1st-gen/packages/overlay/src/slottable-request-event.ts index 6d6caa2050c..3f598742c8c 100644 --- a/1st-gen/packages/overlay/src/slottable-request-event.ts +++ b/1st-gen/packages/overlay/src/slottable-request-event.ts @@ -23,7 +23,7 @@ export class SlottableRequestEvent extends Event { this.name = name; this.data = data; this.slotName = key !== undefined ? `${name}.${key}` : name; - if (window.__swc.DEBUG) { + if (window.__swc?.DEBUG && window.__swc?.warn) { window.__swc.warn( undefined, `⚠️ WARNING ⚠️ : \`slottable-request\` events are experimental and there is no guarantees behind usage of them in an application!! Their shape and presence within the library could be changed at anytime.