@searchfe/inject-js
Advanced tools
Comparing version
@@ -0,1 +1,8 @@ | ||
## [1.6.3](https://github.com/searchfe/inject-js/compare/v1.6.2...v1.6.3) (2022-03-29) | ||
### Bug Fixes | ||
* 修复provider未create完成时调用destroy报错 ([dff2e21](https://github.com/searchfe/inject-js/commit/dff2e21810cc7a273afd93abab1fae9b5eb51ce4)) | ||
## [1.6.2](https://github.com/searchfe/inject-js/compare/v1.6.1...v1.6.2) (2021-04-23) | ||
@@ -2,0 +9,0 @@ |
@@ -98,3 +98,3 @@ define([ | ||
var provider = this.providers.get(token); | ||
if (typeof provider.destroy === 'function') { | ||
if (provider && typeof provider.destroy === 'function') { | ||
provider.destroy(); | ||
@@ -101,0 +101,0 @@ } |
@@ -27,3 +27,3 @@ define([ | ||
ServiceProviderImpl.prototype.destroy = function () { | ||
if (typeof this.instance.destroy === 'function') { | ||
if (this.instance && typeof this.instance.destroy === 'function') { | ||
this.instance.destroy(); | ||
@@ -30,0 +30,0 @@ } |
@@ -106,3 +106,3 @@ "use strict"; | ||
const provider = this.providers.get(token); | ||
if (typeof provider.destroy === 'function') { | ||
if (provider && typeof provider.destroy === 'function') { | ||
provider.destroy(); | ||
@@ -109,0 +109,0 @@ } |
@@ -18,3 +18,3 @@ "use strict"; | ||
destroy() { | ||
if (typeof this.instance.destroy === 'function') { | ||
if (this.instance && typeof this.instance.destroy === 'function') { | ||
this.instance.destroy(); | ||
@@ -21,0 +21,0 @@ } |
@@ -108,3 +108,3 @@ import { __spreadArrays } from "tslib"; | ||
var provider = this.providers.get(token); | ||
if (typeof provider.destroy === 'function') { | ||
if (provider && typeof provider.destroy === 'function') { | ||
provider.destroy(); | ||
@@ -111,0 +111,0 @@ } |
@@ -20,3 +20,3 @@ import { __spreadArrays } from "tslib"; | ||
ServiceProviderImpl.prototype.destroy = function () { | ||
if (typeof this.instance.destroy === 'function') { | ||
if (this.instance && typeof this.instance.destroy === 'function') { | ||
this.instance.destroy(); | ||
@@ -23,0 +23,0 @@ } |
{ | ||
"name": "@searchfe/inject-js", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"description": "A Dependency Injection library", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
Sorry, the diff of this file is too big to display
534429
0.06%