Skip to content

Commit 17dd4e1

Browse files
committed
polyfill withResolvers to fix #599
1 parent 47699e7 commit 17dd4e1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/web/editor.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,18 @@ <h2>Announcements</h2>
454454
var GIT_BRANCH = "{{ &GIT_BRANCH }}";
455455
</script>
456456

457+
<script>
458+
if (typeof Promise.withResolvers === 'undefined') {
459+
Promise.withResolvers = function () {
460+
let resolve, reject
461+
const promise = new Promise((res, rej) => {
462+
resolve = res
463+
reject = rej
464+
})
465+
return { promise, resolve, reject }
466+
}
467+
}
468+
</script>
457469
<script src="{{ &BASE_URL }}/js/es6-shim.js"></script>
458470
<script src="{{ &BASE_URL }}/js/jquery.min.js"></script>
459471
<script src="{{ &BASE_URL }}/js/jquery-ui.min.js"></script>

0 commit comments

Comments
 (0)