Skip to content

Commit

Permalink
Merge branch 'fix/hasOwnProperty_of_undefined' of github.com:contents…
Browse files Browse the repository at this point in the history
…tack/datasync-filesystem-sdk into sre/remove-dist
  • Loading branch information
abhnv42 committed Feb 1, 2023
2 parents d3a55d9 + 0eba0d6 commit 3940b6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand All @@ -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']
Expand Down Expand Up @@ -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']
Expand Down

0 comments on commit 3940b6f

Please sign in to comment.