can-globals
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -144,3 +144,3 @@ 'use strict'; | ||
if (typeof value === 'undefined') { | ||
if (typeof value === 'undefined' || value === null) { | ||
this.deleteKeyValue(key); | ||
@@ -147,0 +147,0 @@ } else { |
@@ -182,1 +182,12 @@ 'use strict'; | ||
}); | ||
QUnit.test('reset export value with null (can-stache#288)', function() { | ||
var globals = new Globals(); | ||
globals.define('foo', 'bar'); | ||
var e = globals.makeExport('foo'); | ||
equal(e(), 'bar'); | ||
e('baz'); | ||
equal(e(), 'baz'); | ||
e(null); | ||
equal(e(), 'bar'); | ||
}); |
{ | ||
"name": "can-globals", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "This module provides a dependency injection container. Modules may define a key and specify a default value (which can be static, cached lazy, or dynamic lazy), but other code can set and reset the value as needed. There is also an event system, for alerting on value changes, both specific to a key and for any key.", | ||
@@ -5,0 +5,0 @@ "main": "can-globals.js", |
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
26394
704