Comparing version 0.0.7 to 0.0.8
@@ -5,3 +5,3 @@ { | ||
"description": "Core JavaScript library for browser runtime", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "fish" |
15
utils.js
@@ -75,2 +75,13 @@ /** | ||
function isNeedClone(d){ | ||
if(!d) return false; | ||
if(d instanceof HTMLElement) return false; | ||
if(d[0] && d[0] instanceof HTMLElement) return false; | ||
if(d.globalCompositeOperation) return false;//ctx的情况 | ||
//还需判断div 等节点 | ||
return true; | ||
} | ||
var maxDepth = 3; | ||
@@ -84,3 +95,3 @@ function deepMerge(dest, src, isDirect, depth) { | ||
console.log('层数过深, 全部继承'); | ||
return clone(src); | ||
return src; | ||
} | ||
@@ -98,3 +109,3 @@ // | ||
} | ||
if (typeof(value) === 'object' && (!isDirect)) value = deepClone(value); | ||
if (typeof(value) === 'object' && (!isDirect) && isNeedClone(value)) value = deepClone(value); | ||
result[i] = value; | ||
@@ -101,0 +112,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20980
676