From 9c1f6c0c0472209dbf1929f0ae8d0e00afd3d648 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 5 Feb 2021 11:36:56 +0100 Subject: [PATCH] fixes #1322 class attributes must be defined in contructor --- admin/themes/default/js/common.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/admin/themes/default/js/common.js b/admin/themes/default/js/common.js index 11504da8b..7bc15e734 100644 --- a/admin/themes/default/js/common.js +++ b/admin/themes/default/js/common.js @@ -142,10 +142,12 @@ $('.search-input').on('input', function() { // Class to implement a temporary state and reverse it class TemporaryState { - //Arrays to reverse changes - attrChanges = []; //Attribute changes : {object(s), attribute, value} - classChanges = []; //Class changes : {object(s), state(add:true/remove:false), class} - htmlChanges = []; //Html changes : {object(s), html} + constructor() { + //Arrays to reverse changes + this.attrChanges = []; //Attribute changes : {object(s), attribute, value} + this.classChanges = []; //Class changes : {object(s), state(add:true/remove:false), class} + this.htmlChanges = []; //Html changes : {object(s), html} + } /** * Change temporaly an attribute of an object