kung-fig-dynamic
Advanced tools
Comparing version 0.42.3 to 0.42.4
@@ -72,2 +72,8 @@ /* | ||
Dynamic.prototype.getDeepFinalClone = function( ctx , bound ) { | ||
return Dynamic.getDeepFinalClone( this , ctx , bound ) ; | ||
} ; | ||
Dynamic.get = Dynamic.getValue = function( value , ctx , bound ) { | ||
@@ -103,4 +109,2 @@ if ( value && typeof value === 'object' && value.__isDynamic__ ) { return value.getValue( ctx , bound ) ; } | ||
|| value.__isDynamic__ | ||
// If we already have a unique new value, no need to clone anything. | ||
|| value !== originalValue || ! value || typeof value !== 'object' | ||
) { | ||
@@ -110,2 +114,4 @@ return value ; | ||
if ( value !== originalValue ) { changed = true ; } | ||
if ( Array.isArray( value ) ) { | ||
@@ -147,4 +153,2 @@ clone = value.map( v => { | ||
|| value.__isDynamic__ | ||
// If we already have a unique new value, no need to clone anything. | ||
|| value !== originalValue || ! value || typeof value !== 'object' | ||
) { | ||
@@ -154,2 +158,5 @@ return value ; | ||
// If we already have a unique new value, no need to clone anything: switch to .getDeepFinalValue() | ||
if ( value !== originalValue ) { Dynamic.getDeepFinalValue( value , ctx , bound ) ; } | ||
if ( Array.isArray( value ) ) { | ||
@@ -204,8 +211,2 @@ return value.map( v => Dynamic.getDeepFinalClone( v , ctx , bound ) ) ; | ||
else if ( proto === Object.prototype || proto === null ) { | ||
/* | ||
if ( value.__isDynamic__ || value.__isApplicable__ ) { | ||
console.log( "Oh my gawd! Bug!" , proto , proto.constructor.name , value.constructor.name , value.__isDynamic__ , value.__isApplicable__ , value ) ; | ||
} | ||
*/ | ||
if ( originalValue === value ) { copy = {} ; } | ||
@@ -212,0 +213,0 @@ |
{ | ||
"name": "kung-fig-dynamic", | ||
"version": "0.42.3", | ||
"version": "0.42.4", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=6.0.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
21421
424