From b8e4b5f8841a8357eff1d42bffa35839d903e3ca Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 27 Feb 2020 12:13:07 +0000 Subject: [PATCH] FIX: Polyfill Promise for IE11 (#9057) Co-authored-by: Joffrey JAFFEUX --- plugins/discourse-internet-explorer/public/js/ie.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/discourse-internet-explorer/public/js/ie.js b/plugins/discourse-internet-explorer/public/js/ie.js index 4c0fbf5fd8e..6c998e402a1 100644 --- a/plugins/discourse-internet-explorer/public/js/ie.js +++ b/plugins/discourse-internet-explorer/public/js/ie.js @@ -970,3 +970,12 @@ if (!String.prototype.startsWith) { return ES6; }); /* eslint-enable */ + +// Polyfill Promise - used by popper.js +window.addEventListener( + "load", + function() { + window.Promise = require("rsvp").Promise; + }, + false +);