ioc-service-container
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -8,2 +8,8 @@ # Changelog | ||
## [1.2.1] - 2020-03-22 | ||
### Fixed | ||
* Fixed `ServiceContainer.override` function to ignore case-sensitiveness | ||
## [1.2.0] - 2020-03-22 | ||
@@ -10,0 +16,0 @@ |
@@ -26,3 +26,4 @@ "use strict"; | ||
override(id, factory) { | ||
const index = services.findIndex(s => s.id === id.toLowerCase()); | ||
const lowerId = id.toLowerCase(); | ||
const index = services.findIndex(s => s.id === lowerId); | ||
if (index === -1) { | ||
@@ -32,3 +33,3 @@ throw new Error(`No service is registered for [${id}]`); | ||
services[index] = { | ||
id, | ||
id: lowerId, | ||
factory | ||
@@ -35,0 +36,0 @@ }; |
{ | ||
"name": "ioc-service-container", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Lightweight ioc service container", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
11688
95