Skip to content

Commit a6315ad

Browse files
committed
Live preview error on refresh resolved
1 parent e0630fd commit a6315ad

File tree

7 files changed

+73
-32
lines changed

7 files changed

+73
-32
lines changed

.talismanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
threshold: medium
22
fileignoreconfig:
33
- filename: package-lock.json
4-
checksum: 032d3a56d28528673b84e083a30d726d15b7c0616d1d6e7e4936d7e6c05534ee
4+
checksum: be538ba2f4b106e5de0a55a3137271f659901e287ec09e8ae93351543242712e

package-lock.json

Lines changed: 62 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "contentstack",
3-
"version": "3.15.3",
3+
"version": "3.15.4",
44
"description": "Contentstack Javascript SDK",
55
"homepage": "https://www.contentstack.com/",
66
"author": {
@@ -11,7 +11,7 @@
1111
"browser": "dist/web/contentstack.js",
1212
"react-native": "dist/react-native/contentstack.js",
1313
"types": "./index.d.ts",
14-
"_id": "[email protected].0",
14+
"_id": "[email protected].4",
1515
"scripts": {
1616
"test": "npm run test:e2e && npm run test:typescript",
1717
"test:e2e": "tape test/index.js | tap-html --out ./tap-html.html",
@@ -55,11 +55,11 @@
5555
],
5656
"dist": {
5757
"shasum": "a328ed07240476a26b31a23261355dc929e1da63",
58-
"tarball": "https://registry.npmjs.org/contentstack/-/contentstack-3.15.0.tgz"
58+
"tarball": "https://registry.npmjs.org/contentstack/-/contentstack-3.15.4.tgz"
5959
},
6060
"license": "MIT",
6161
"directories": {},
62-
"_resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.15.0.tgz",
62+
"_resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.15.4.tgz",
6363
"_npmOperationalInternal": {
6464
"host": "packages-18-east.internal.npmjs.com",
6565
"tmp": "tmp/contentstack-3.15.0.tgz_1477830884275_0.9869455888401717"

src/core/modules/assets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default class Assets {
117117
}
118118
}
119119
var options = Utils.mergeDeep(this.fetchOptions, fetchOptions);
120-
return Utils.sendRequest(this, options);
120+
return Utils.sendRequest(Utils.mergeDeep({}, this), options);
121121
} else {
122122
console.error("Kindly provide an asset uid. e.g. .Assets('asset_uid')");
123123
}

src/core/modules/entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export default class Entry {
358358
}
359359
};
360360
var options = Utils.mergeDeep(this.fetchOptions, fetchOptions);
361-
return Utils.sendRequest(this, options);
361+
return Utils.sendRequest(Utils.mergeDeep({}, this), options);
362362
} else {
363363
console.error("Kindly provide an entry uid. e.g. .Entry('asset_uid')");
364364
}

src/core/modules/query.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ export default class Query extends Entry {
762762
}
763763
};
764764
var options = Utils.mergeDeep(this.fetchOptions, fetchOptions);
765-
return Utils.sendRequest(this, options);
765+
return Utils.sendRequest(Utils.mergeDeep({}, this), options);
766766
}
767767

768768
/**
@@ -799,7 +799,7 @@ export default class Query extends Entry {
799799
}
800800
};
801801
var options = Utils.mergeDeep({}, this.fetchOptions);
802-
return Utils.sendRequest(this, options);
802+
return Utils.sendRequest(Utils.mergeDeep({}, this), options);
803803
}
804804

805805
}

src/core/stack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export default class Stack {
214214

215215
livePreviewQuery(query) {
216216
if (this.live_preview) {
217-
this.live_preview.live_preview = query.live_preview;
217+
this.live_preview.live_preview = query.live_preview || 'init';
218218
this.live_preview.content_type_uid = query.content_type_uid;
219219
this.live_preview.entry_uid = query.entry_uid
220220
}
@@ -523,7 +523,7 @@ export default class Stack {
523523
}
524524
}
525525
var options = Utils.mergeDeep(this.fetchOptions, fetchOptions);
526-
return Utils.sendRequest(this, options);
526+
return Utils.sendRequest(Utils.mergeDeep({}, this), options);
527527
}
528528

529529
/**

0 commit comments

Comments
 (0)