Commit 32fd8684 32fd8684e028fcc4e1d7a6e851edfca56babf39b by Laurent Jouanneau

Refs #482: fixes utils.equals for gecko

Using instanceof is not enough for Gecko.
1 parent 7806150c
...@@ -143,8 +143,10 @@ function equals(v1, v2) { ...@@ -143,8 +143,10 @@ function equals(v1, v2) {
143 if (isFunction(v1)) { 143 if (isFunction(v1)) {
144 return v1.toString() === v2.toString(); 144 return v1.toString() === v2.toString();
145 } 145 }
146 if (v1 instanceof Object) { 146 // with Gecko, instanceof is not enough to test object
147 if (!(v2 instanceof Object) || Object.keys(v1).length !== Object.keys(v2).length) { 147 if (v1 instanceof Object || isObject(v1)) {
148 if (!(v2 instanceof Object || isObject(v2)) ||
149 Object.keys(v1).length !== Object.keys(v2).length) {
148 return false; 150 return false;
149 } 151 }
150 for (var k in v1) { 152 for (var k in v1) {
......