Commit 69c0af3d authored by Romain Courteaud's avatar Romain Courteaud

Do not freeze RegExp.

For some reason, recent Firefox prevent using frozen regexp.
parent 65066a88
This diff is collapsed.
...@@ -92,7 +92,7 @@ var objectHelper = (function () { ...@@ -92,7 +92,7 @@ var objectHelper = (function () {
if (object.hasOwnProperty(propertyName)) { if (object.hasOwnProperty(propertyName)) {
property = object[propertyName]; property = object[propertyName];
// be aware, arrays are 'object', too // be aware, arrays are 'object', too
if (typeof property === "object") { if ((typeof property === "object") && !(property instanceof RegExp)) {
deepFreeze(property); deepFreeze(property);
} }
} }
......
...@@ -66,7 +66,7 @@ var objectHelper = (function () { ...@@ -66,7 +66,7 @@ var objectHelper = (function () {
if (object.hasOwnProperty(propertyName)) { if (object.hasOwnProperty(propertyName)) {
property = object[propertyName]; property = object[propertyName];
// be aware, arrays are 'object', too // be aware, arrays are 'object', too
if (typeof property === "object") { if ((typeof property === "object") && !(property instanceof RegExp)) {
deepFreeze(property); deepFreeze(property);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment