Skip to content

Commit

Permalink
fix __import_unsupported being undefined (#504)
Browse files Browse the repository at this point in the history
* fix __import_unsupported being undefined

* remove !

* Create smart-bees-divide.md
  • Loading branch information
conico974 authored Sep 5, 2024
1 parent 1b87222 commit b8bd2f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-bees-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"open-next": patch
---

fix __import_unsupported being undefined
2 changes: 1 addition & 1 deletion packages/open-next/src/build/edge/createEdgeBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export async function buildEdgeBundle({
const defaultDefineProperty = Object.defineProperty;
Object.defineProperty = function(o, p, a) {
if(p=== '__import_unsupported') {
if(p=== '__import_unsupported' && Boolean(globalThis.__import_unsupported)) {
return;
}
return defaultDefineProperty(o, p, a);
Expand Down

0 comments on commit b8bd2f0

Please sign in to comment.