Skip to content

Commit

Permalink
fix: resolved undefined method issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vkalta committed Jan 25, 2023
1 parent 7c91895 commit 0eba0d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports.getBaseDir = getBaseDir;
*/
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 @@ -102,7 +102,7 @@ exports.getEntriesPath = getEntriesPath;
*/
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 @@ -130,7 +130,7 @@ exports.getAssetsPath = getAssetsPath;
*/
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
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 0eba0d6

Please sign in to comment.