can-stache-key
Advanced tools
Comparing version 1.4.1 to 1.4.3
@@ -324,1 +324,15 @@ var observeReader = require("can-stache-key"); | ||
}); | ||
QUnit.test(".then won't call bindings #49", function(assert){ | ||
var promiseIsh = {}; | ||
Object.defineProperty(promiseIsh,"then",{ | ||
get: function(){ | ||
ObservationRecorder.add(this, "then"); | ||
} | ||
}); | ||
ObservationRecorder.start(); | ||
observeReader.read(promiseIsh, observeReader.reads("prop")); | ||
var recordings = ObservationRecorder.stop(); | ||
assert.equal( recordings.keyDependencies.size, 0, "no key recordings"); | ||
}); |
@@ -14,2 +14,5 @@ "use strict"; | ||
var observeReader; | ||
var isPromiseLike = ObservationRecorder.ignore(function isPromiseLike(value){ | ||
return typeof value === "object" && value && typeof value.then === "function"; | ||
}); | ||
@@ -213,3 +216,4 @@ var bindName = Function.prototype.bind; | ||
// special reflections. | ||
if(canReflect.isPromise(value) || typeof value === "object" && value && typeof value.then === "function") { | ||
if(canReflect.isPromise(value) || | ||
isPromiseLike(value)) { | ||
canReflectPromise(value); | ||
@@ -216,0 +220,0 @@ } |
{ | ||
"name": "can-stache-key", | ||
"version": "1.4.1", | ||
"version": "1.4.3", | ||
"description": "Read and write keys on a value", | ||
@@ -5,0 +5,0 @@ "homepage": "https://canjs.com", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
29584
631
0