Skip to content

Commit

Permalink
fix cdn check for node
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Nov 20, 2024
1 parent fa6c082 commit c52f95c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pxtlib/emitter/cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace pxt.Cloud {
export function useCdnApi() {
return pxt.webConfig && !pxt.webConfig.isStatic
&& !BrowserUtils.isLocalHost() && !!pxt.webConfig.cdnUrl
&& !/nocdn=1/i.test(window.location.href);
&& (typeof window === "undefined" || !/nocdn=1/i.test(window.location.href));
}

export function cdnApiUrl(url: string) {
Expand Down

0 comments on commit c52f95c

Please sign in to comment.