From 0a69d48cde0f9cf77d54c1f64195b22c2fbe6e7e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 16 Dec 2024 15:52:09 -0800 Subject: [PATCH] Fixed: Loading calendar on older browsers (cherry picked from commit edfc12e27a00fd927df0de6ccb3961efe8f5dc3b) --- frontend/src/polyfills.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/polyfills.js b/frontend/src/polyfills.js index ece7aea85..04de2c85c 100644 --- a/frontend/src/polyfills.js +++ b/frontend/src/polyfills.js @@ -8,6 +8,7 @@ window.console.debug = window.console.debug || function() {}; window.console.warn = window.console.warn || function() {}; window.console.assert = window.console.assert || function() {}; +// TODO: Remove in v5, well suppoprted in browsers if (!String.prototype.startsWith) { Object.defineProperty(String.prototype, 'startsWith', { enumerable: false, @@ -20,6 +21,7 @@ if (!String.prototype.startsWith) { }); } +// TODO: Remove in v5, well suppoprted in browsers if (!String.prototype.endsWith) { Object.defineProperty(String.prototype, 'endsWith', { enumerable: false, @@ -34,8 +36,14 @@ if (!String.prototype.endsWith) { }); } +// TODO: Remove in v5, use `includes` instead if (!('contains' in String.prototype)) { String.prototype.contains = function(str, startIndex) { return String.prototype.indexOf.call(this, str, startIndex) !== -1; }; } + +// For Firefox ESR 115 support +if (!Object.groupBy) { + import('core-js/actual/object/group-by'); +}