diff --git a/app/assets/javascripts/app/controllers/knowledge_base/agent_controller.coffee b/app/assets/javascripts/app/controllers/knowledge_base/agent_controller.coffee index f42538f82..e516936f4 100644 --- a/app/assets/javascripts/app/controllers/knowledge_base/agent_controller.coffee +++ b/app/assets/javascripts/app/controllers/knowledge_base/agent_controller.coffee @@ -313,7 +313,7 @@ class App.KnowledgeBaseAgentController extends App.Controller .map (model) -> newIds = Object.keys data[model] oldIds = App[model].all().map (elem) -> elem.id - diff = oldIds.filter (elem) -> !newIds.includes(String(elem)) + diff = oldIds.filter (elem) -> !_.includes(newIds, String(elem)) {modelName: model, ids: diff} , {} diff --git a/app/assets/javascripts/app/lib/app_post/multi_locales.coffee b/app/assets/javascripts/app/lib/app_post/multi_locales.coffee index d4360af56..25b9b6581 100644 --- a/app/assets/javascripts/app/lib/app_post/multi_locales.coffee +++ b/app/assets/javascripts/app/lib/app_post/multi_locales.coffee @@ -46,7 +46,7 @@ class App.MultiLocales extends App.Controller .filter (elem) -> elem && elem != self_value App.Locale.all().filter (elem) -> - !takenCodes.includes(String(elem.id)) + !_.includes(takenCodes, String(elem.id)) remove: (e) -> domRow = $(e.currentTarget).closest('tr')[0]