fixes so it works in no constants mode

This commit is contained in:
Sam 2015-11-21 12:49:23 +11:00
parent 34af6a5d54
commit 587e9d917c
2 changed files with 7 additions and 8 deletions

View File

@ -1,7 +0,0 @@
export default {
name: 'add-query-pluralization',
initialize(container) {
container.lookup('store:main').addPluralization('query', 'queries');
}
};

View File

@ -1,6 +1,9 @@
export default { export default {
name: 'polyfill-string-endswith', name: 'initialize-data-explorer',
initialize(container) { initialize(container) {
container.lookup('store:main').addPluralization('query', 'queries');
if (!String.prototype.endsWith) { if (!String.prototype.endsWith) {
String.prototype.endsWith = function(searchString, position) { String.prototype.endsWith = function(searchString, position) {
var subjectString = this.toString(); var subjectString = this.toString();
@ -12,5 +15,8 @@ export default {
return lastIndex !== -1 && lastIndex === position; return lastIndex !== -1 && lastIndex === position;
}; };
} }
// load route
require('discourse/plugins/discourse-data-explorer/discourse/explorer-route-map');
} }
}; };