@forter/directives
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [3.1.1](https://github.com/forter/web-components/compare/@forter/directives@3.1.0...@forter/directives@3.1.1) (2024-03-18) | ||
### Bug Fixes | ||
* translate with numbers if 0 is provided ([5ef2d23](https://github.com/forter/web-components/commit/5ef2d23)) | ||
# [3.1.0](https://github.com/forter/web-components/compare/@forter/directives@3.0.7...@forter/directives@3.1.0) (2022-06-28) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@forter/directives", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "lit-html directives for Forter Components", | ||
@@ -47,3 +47,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "011f71f414e87011363837d675ba0c7245adbbe6" | ||
"gitHead": "8c3d952c637410e6c281f25c272c612ebdc611f4" | ||
} |
@@ -23,3 +23,3 @@ import { get } from '../get'; | ||
const injectKey = path.substring(1, path.length - 1); | ||
return values[injectKey] || path; | ||
return values[injectKey] !== undefined ? values[injectKey] : path; | ||
}); | ||
@@ -26,0 +26,0 @@ } |
@@ -66,2 +66,16 @@ /* eslint import/no-extraneous-dependencies: 0 */ | ||
}); | ||
it('should return with number if number is provided', async () => { | ||
const tarnslationMap = { WELCOME: 'Welcome to the number {count}!' }; | ||
withLangs( | ||
{ en: tarnslationMap }, | ||
()=> {} | ||
); | ||
const element = await fixture(html` | ||
<div>${translate('WELCOME', { count: 0 })}</div> | ||
`); | ||
expect(element.innerText).to.have.string('Welcome to the number 0!'); | ||
}); | ||
}); |
@@ -26,3 +26,3 @@ import { get } from '../get/get.js'; | ||
const injectKey = path.substring(1, path.length - 1); | ||
return values[injectKey] || path; | ||
return values[injectKey] !== undefined ? values[injectKey] : path; | ||
}); | ||
@@ -29,0 +29,0 @@ } |
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
54519
649