diff --git a/.eslintrc.json b/.eslintrc.json index acb0598697..2006ff7a47 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -120,7 +120,7 @@ "numbers": false }], "no-array-constructor": "error", - "array-callback-return": 1, + "array-callback-return": "error", "template-curly-spacing": "error", "no-useless-escape": 1, "func-style": ["off", "expression"], diff --git a/static/js/admin.js b/static/js/admin.js index 20ffb0228c..baba889720 100644 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -792,7 +792,9 @@ function _setup_page() { e.stopPropagation(); var emoji_status = $('#admin-emoji-status'); var emoji = {}; - $(this).serializeArray().map(function (x) {emoji[x.name] = x.value;}); + _.each($(this).serializeArray(), function (obj) { + emoji[obj.name] = obj.value; + }); channel.put({ url: "/json/realm/emoji", @@ -844,7 +846,9 @@ function _setup_page() { pattern_status.hide(); format_status.hide(); var filter = {}; - $(this).serializeArray().map(function (x) {filter[x.name] = x.value;}); + _.each($(this).serializeArray(), function (obj) { + filter[obj.name] = obj.value; + }); channel.post({ url: "/json/realm/filters",