Comparing version 3.1.2 to 3.1.3
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="3.1.3"></a> | ||
## [3.1.3](https://github.com/martinheidegger/i18n-core/compare/v3.1.2...v3.1.3) (2017-05-30) | ||
### Bug Fixes | ||
* sections and absSection are now not interfering with each other ([d841df5](https://github.com/martinheidegger/i18n-core/commit/d841df5)) | ||
<a name="3.1.2"></a> | ||
@@ -7,0 +17,0 @@ ## [3.1.2](https://github.com/martinheidegger/i18n-core/compare/v3.1.1...v3.1.2) (2017-05-29) |
@@ -5,5 +5,7 @@ 'use strict' | ||
var prefix = node.currentPrefix | ||
while (node !== node.absRoot) { | ||
prefix = node.absRoot.currentPrefix + prefix | ||
node = node.absRoot | ||
while (node.parent) { | ||
node = node.parent | ||
if (node.currentPrefix !== undefined && node.currentPrefix !== '') { | ||
prefix = node.currentPrefix + prefix | ||
} | ||
} | ||
@@ -10,0 +12,0 @@ return addPrefix(prefix, key) |
{ | ||
"name": "i18n-core", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Basic i18n translation.", | ||
@@ -35,13 +35,6 @@ "main": "index.js", | ||
"devDependencies": { | ||
"acorn-jsx": "^4.0.1", | ||
"codeclimate-test-reporter": "github:codeclimate/javascript-test-reporter#97f1ff2cf18cd5f03191d3d53e671c47e954f2fa", | ||
"csv-stringify": "^1.0.4", | ||
"eslint": "^3.19.0", | ||
"eslint-config-standard": "^10.2.1", | ||
"eslint-plugin-import": "^2.3.0", | ||
"eslint-plugin-node": "^4.2.2", | ||
"eslint-plugin-promise": "^3.5.0", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"mockery": "^2.0.0", | ||
"nyc": "^10.3.2", | ||
"standard-version": "^4.0.0", | ||
@@ -48,0 +41,0 @@ "tap": "^10.3.2" |
@@ -28,2 +28,9 @@ 'use strict' | ||
test('a section of an absolute section should not loose the prefixes.', function (t) { | ||
var root = i18n({}) | ||
var prefixed = root.absSection('a').section('b') | ||
t.equals(prefixed('c'), 'a.b.c') | ||
t.end() | ||
}) | ||
test('unlocking shouldnt create a new node', function (t) { | ||
@@ -30,0 +37,0 @@ var root = i18n({a: {b: 'c'}}) |
Sorry, the diff of this file is too big to display
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
649513
6
4904