Skip to content

A platform for community discussion. Free, open, simple.

DEV: Explicitly disable Ember string prototype extensions (#24110)

David Taylord40530545607
diff --git a/app/assets/javascripts/discourse/config/environment.js b/app/assets/javascripts/discourse/config/environment.js
index 2a0b38dbc4f..903436156e0 100644
--- a/app/assets/javascripts/discourse/config/environment.js
+++ b/app/assets/javascripts/discourse/config/environment.js
@@ -15,6 +15,7 @@ module.exports = function (environment) {
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
+ String: false,
},
},
exportApplicationGlobal: true,
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cdaf0ee9e97..54582775217 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -26,6 +26,7 @@ module ApplicationHelper
},
EXTEND_PROTOTYPES: {
Date: false,
+ String: false,
},
_APPLICATION_TEMPLATE_WRAPPER: false,
_DEFAULT_ASYNC_OBSERVERS: true,