react-services-injector
Advanced tools
Comparing version 0.2.0-beta.7 to 0.2.0-beta.8
@@ -18,3 +18,3 @@ var Service = function() { | ||
this.updateComponents = function() { | ||
return Promise.all(this.components.map(function(component) { | ||
return Promise.all(self.components.map(function(component) { | ||
return new Promise(function(resolve) { | ||
@@ -40,3 +40,5 @@ component.instance.forceUpdate.call(component.instance, resolve); | ||
return self.updateComponents() | ||
.then(() => result); | ||
.then(function () { | ||
return result; | ||
}); | ||
}; | ||
@@ -46,3 +48,5 @@ }); | ||
instance.$update = function () { | ||
self.components.forEach(component => component.instance.forceUpdate.call(component.instance)); | ||
self.components.forEach(function(component) { | ||
component.instance.forceUpdate.call(component.instance); | ||
}); | ||
}; | ||
@@ -94,3 +98,3 @@ | ||
this.disconnectInstance = function(key) { | ||
self.components.some((component, index) => { | ||
self.components.some(function(component, index) { | ||
if (component.key === key) { | ||
@@ -97,0 +101,0 @@ self.components.splice(index, 1); |
{ | ||
"name": "react-services-injector", | ||
"version": "0.2.0-beta.7", | ||
"version": "0.2.0-beta.8", | ||
"description": "A library to create and use sigleton-services in your React application.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
47248
220