diff --git a/gui/app/components/document/settings-meta.js b/gui/app/components/document/settings-meta.js index 71047034..f3104479 100644 --- a/gui/app/components/document/settings-meta.js +++ b/gui/app/components/document/settings-meta.js @@ -147,15 +147,15 @@ export default Component.extend(Notifier, { let tag3 = this.get("tag3").toLowerCase().trim(); let save = "#"; - if (tag1.startsWith('-')) { + if (is.startWith(tag1, '-')) { $('#add-tag-field1').addClass('is-invalid'); return; } - if (tag2.startsWith('-')) { + if (is.startWith(tag2, '-')) { $('#add-tag-field2').addClass('is-invalid'); return; } - if (tag3.startsWith('-')) { + if (is.startWith(tag3, '-')) { $('#add-tag-field3').addClass('is-invalid'); return; } diff --git a/gui/app/services/ajax.js b/gui/app/services/ajax.js index c260a66f..e43715d4 100644 --- a/gui/app/services/ajax.js +++ b/gui/app/services/ajax.js @@ -39,7 +39,7 @@ export default AjaxService.extend({ let appVersion = headers['x-documize-version']; // when unauthorized on local API AJAX calls, redirect to app root - if (status === 401 && is.not.undefined(appVersion) && is.not.includes(window.location.href, '/auth')) { + if (status === 401 && is.not.undefined(appVersion) && is.not.include(window.location.href, '/auth')) { this.get('localStorage').clearAll(); window.location.href = 'auth/login'; } diff --git a/gui/config/environment.js b/gui/config/environment.js index 13de472a..8fbe66cf 100644 --- a/gui/config/environment.js +++ b/gui/config/environment.js @@ -12,7 +12,6 @@ /* jshint node: true */ module.exports = function (environment) { - var ENV = { modulePrefix: 'documize', podModulePrefix: 'documize/pods', @@ -94,7 +93,7 @@ module.exports = function (environment) { process.argv.forEach(function (element) { if (element !== undefined) { - if (element.startsWith("apiHost=")) { + if (element.indexOf('apiHost=') === 0) { element = element.replace("apiHost=", ""); ENV.apiHost = element; }