diff --git a/framework/core/js/forum/dist/app.js b/framework/core/js/forum/dist/app.js index 60a6267de..259474a05 100644 --- a/framework/core/js/forum/dist/app.js +++ b/framework/core/js/forum/dist/app.js @@ -21470,6 +21470,8 @@ System.register('flarum/components/DiscussionsSearchSource', ['flarum/helpers/hi value: function search(query) { var _this = this; + query = query.toLowerCase(); + this.results[query] = []; var params = { @@ -21485,6 +21487,8 @@ System.register('flarum/components/DiscussionsSearchSource', ['flarum/helpers/hi }, { key: 'view', value: function view(query) { + query = query.toLowerCase(); + var results = this.results[query] || []; return [m( @@ -28066,6 +28070,8 @@ System.register('flarum/components/UsersSearchSource', ['flarum/helpers/highligh }, { key: 'view', value: function view(query) { + query = query.toLowerCase(); + var results = app.store.all('users').filter(function (user) { return user.username().toLowerCase().substr(0, query.length) === query; }); diff --git a/framework/core/js/forum/src/components/DiscussionsSearchSource.js b/framework/core/js/forum/src/components/DiscussionsSearchSource.js index 6ab1b3d99..e1d1e1c4f 100644 --- a/framework/core/js/forum/src/components/DiscussionsSearchSource.js +++ b/framework/core/js/forum/src/components/DiscussionsSearchSource.js @@ -13,6 +13,8 @@ export default class DiscussionsSearchSource { } search(query) { + query = query.toLowerCase(); + this.results[query] = []; const params = { @@ -25,6 +27,8 @@ export default class DiscussionsSearchSource { } view(query) { + query = query.toLowerCase(); + const results = this.results[query] || []; return [ diff --git a/framework/core/js/forum/src/components/UsersSearchSource.js b/framework/core/js/forum/src/components/UsersSearchSource.js index 0ea76e22c..f05fbb30d 100644 --- a/framework/core/js/forum/src/components/UsersSearchSource.js +++ b/framework/core/js/forum/src/components/UsersSearchSource.js @@ -17,6 +17,8 @@ export default class UsersSearchResults { } view(query) { + query = query.toLowerCase(); + const results = app.store.all('users') .filter(user => user.username().toLowerCase().substr(0, query.length) === query);