diff --git a/__test__/entry.test.ts b/__test__/entry.test.ts index 2548935..dfd3bc2 100644 --- a/__test__/entry.test.ts +++ b/__test__/entry.test.ts @@ -223,7 +223,7 @@ describe("Entry", () => { dataWithoutEntry.entry = {}; entry = new Entry(dataWithoutEntry, connection as any, emitter); expect(() => entry.getField("invaliduid")).toThrowError( - "The data is unsaved. Save the data before requesting the field." + "Invalid uid, Field not found" ); }); diff --git a/package-lock.json b/package-lock.json index 6506f14..dcd22e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@contentstack/app-sdk", - "version": "2.3.3", + "version": "2.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/app-sdk", - "version": "2.3.3", + "version": "2.3.4", "license": "MIT", "dependencies": { "axios": "^1.7.9", diff --git a/package.json b/package.json index 3af26da..c1d6806 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/app-sdk", - "version": "2.3.3", + "version": "2.3.4", "types": "dist/src/index.d.ts", "description": "The Contentstack App SDK allows you to customize your Contentstack applications.", "main": "dist/index.js", diff --git a/src/entry.ts b/src/entry.ts index 14ecd76..d56c45b 100755 --- a/src/entry.ts +++ b/src/entry.ts @@ -154,14 +154,6 @@ class Entry { : this._data; let schema: Schema[0] = this.content_type.schema; - const isDataEmpty = Object.keys(value).length === 0; - - if (isDataEmpty) { - throw new Error( - "The data is unsaved. Save the data before requesting the field." - ); - } - try { let skipNext = false; let skipNextTwo = false;