diff --git a/package.json b/package.json index b9a60bc3..dd101bab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-filesystem-sdk", - "version": "1.0.5", + "version": "1.0.6", "description": "JavaScript filesystem SDK to query data synced via @contentstack/datasync-content-store-filesystem", "main": "dist/index.js", "scripts": { diff --git a/src/utils.ts b/src/utils.ts index 6700937d..3160d57b 100755 --- a/src/utils.ts +++ b/src/utils.ts @@ -88,7 +88,7 @@ export const getBaseDir = ({baseDir}) => { */ export const getEntriesPath = (locale, contentTypeUid) => { // if locale has been read, return data immediately - if (localePaths.hasOwnProperty(locale)) { + if (locale in localePaths) { if (localePaths[locale].hasOwnProperty(contentTypeUid)) { return localePaths[locale][contentTypeUid] } @@ -115,7 +115,7 @@ export const getEntriesPath = (locale, contentTypeUid) => { */ export const getAssetsPath = (locale) => { // if locale has been read, return data immediately - if (localePaths.hasOwnProperty(locale)) { + if (locale in localePaths) { if (localePaths[locale].hasOwnProperty('_assets')) { // tslint:disable-next-line: no-string-literal return localePaths[locale]['_assets'] @@ -144,7 +144,7 @@ export const getAssetsPath = (locale) => { */ export const getContentTypesPath = (locale) => { // if locale has been read, return data immediately - if (localePaths.hasOwnProperty(locale)) { + if (locale in localePaths) { if (localePaths[locale].hasOwnProperty('_content_types')) { // tslint:disable-next-line: no-string-literal return localePaths[locale]['_content_types']