diff --git a/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 b/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 index 9473cbccae5..0728ee8ae15 100644 --- a/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 @@ -12,7 +12,7 @@ export default Ember.Controller.extend({ let filter; if (this.get("filter")) { - filter = this.get("filter").toLowerCase(); + filter = this.get("filter").toLowerCase().trim(); } if ((!filter || 0 === filter.length) && !this.get("onlyOverridden")) { diff --git a/test/javascripts/acceptance/admin-site-settings-test.js.es6 b/test/javascripts/acceptance/admin-site-settings-test.js.es6 index 44ed23aec0b..e52b967e053 100644 --- a/test/javascripts/acceptance/admin-site-settings-test.js.es6 +++ b/test/javascripts/acceptance/admin-site-settings-test.js.es6 @@ -42,7 +42,7 @@ QUnit.test("upload site setting", async assert => { QUnit.test("changing value updates dirty state", async assert => { await visit("/admin/site_settings"); - await fillIn("#setting-filter", "title"); + await fillIn("#setting-filter", " title "); assert.equal(count(".row.setting"), 1, "filter returns 1 site setting"); assert.ok(!exists(".row.setting.overridden"), "setting isn't overriden");