Skip to content

Commit

Permalink
fix: only use JS-compatible syntax related to debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterloftis committed May 2, 2023
1 parent 621cb9d commit da8bce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/base/src/define-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function defineElement(
name: string,
constructor: CustomElementConstructor
): void {
if (window.__swc?.DEBUG) {
if (window.__swc && window.__swc.DEBUG) {
if (customElements.get(name)) {
window.__swc.warn(
undefined,
Expand Down

0 comments on commit da8bce9

Please sign in to comment.