fix Ox.isEqual for RegExp

This commit is contained in:
rlx 2016-02-12 15:59:27 +05:30
parent 92e141cb81
commit 869a5ef5ee

View file

@ -171,8 +171,7 @@ Ox.isEqual = function(a, b) {
} else if (type == 'element') { } else if (type == 'element') {
ret = a.isEqualNode(b); ret = a.isEqualNode(b);
} else if (type == 'regexp') { } else if (type == 'regexp') {
ret = a.global == b.global && a.ignore == b.ignore ret = a.toString() == b.toString();
&& a.multiline == b.multiline && a.source == b.source;
} else if ( } else if (
(type == 'arguments' || type == 'array' || type == 'object') (type == 'arguments' || type == 'array' || type == 'object')
&& Ox.len(a) == Ox.len(b) && Ox.len(a) == Ox.len(b)