From 99b1f79f505887d93e2a3d16edcb2faa5e6af929 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 8 Mar 2017 16:36:43 +0100 Subject: [PATCH] [FIX] report: Array.prototype.includes is ES6 This feature is in the ECMAScript-2016 specification, which is not yet fully supported by all browsers (and phantomjs). --- addons/report/static/src/js/qwebactionmanager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/report/static/src/js/qwebactionmanager.js b/addons/report/static/src/js/qwebactionmanager.js index c7d5933b219..bd9fa43b0fa 100644 --- a/addons/report/static/src/js/qwebactionmanager.js +++ b/addons/report/static/src/js/qwebactionmanager.js @@ -111,9 +111,9 @@ ActionManager.include({ ]; trigger_download(self.session, response, c, current_action, options); - treated_actions.push(current_action) + treated_actions.push(current_action); current_action = current_action.next_report_to_generate; - } while (current_action != null && !treated_actions.includes(current_action)) + } while (current_action && !_.contains(treated_actions, current_action)); //Second part of the condition for security reasons (avoids infinite loop possibilty). return;