From 869a5ef5eec51f177eadc00c05dfaf6f14ac18c7 Mon Sep 17 00:00:00 2001 From: rlx Date: Fri, 12 Feb 2016 15:59:27 +0530 Subject: [PATCH] fix Ox.isEqual for RegExp --- source/Ox/js/Type.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/Ox/js/Type.js b/source/Ox/js/Type.js index 8d61bd08..a3f7843b 100644 --- a/source/Ox/js/Type.js +++ b/source/Ox/js/Type.js @@ -171,8 +171,7 @@ Ox.isEqual = function(a, b) { } else if (type == 'element') { ret = a.isEqualNode(b); } else if (type == 'regexp') { - ret = a.global == b.global && a.ignore == b.ignore - && a.multiline == b.multiline && a.source == b.source; + ret = a.toString() == b.toString(); } else if ( (type == 'arguments' || type == 'array' || type == 'object') && Ox.len(a) == Ox.len(b)