discourse/app/assets/javascripts/polyfills.js

17 lines
453 B
JavaScript
Raw Normal View History

2018-10-26 07:54:03 -05:00
/* eslint-disable */
2018-11-19 04:46:26 -06:00
// Any IE only polyfill should be moved in discourse-internet-explorer plugin
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags#Polyfill
// IE and EDGE
if (RegExp.prototype.flags === undefined) {
Object.defineProperty(RegExp.prototype, "flags", {
configurable: true,
get: function() {
return this.toString().match(/[gimsuy]*$/)[0];
}
});
}
2018-10-26 07:54:03 -05:00
/* eslint-enable */