Skip to content

Commit 4ce6693

Browse files
committed
v2.0
1 parent 83df3bd commit 4ce6693

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

index.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,12 +1662,15 @@
16621662
if (isInitData) { Promise.resolve().then(writeFileSync); }
16631663
else { readFileSync(); }
16641664

1665-
Object.defineProperty(data, '_allowFileReadWrite', {
1666-
get: () => allowFileReadWrite,
1667-
set: (val) => { allowFileReadWrite = Boolean(val); },
1668-
enumerable: false,
1669-
configurable: false
1670-
});
1665+
if (!data._allowFileReadWrite) {
1666+
1667+
Object.defineProperty(data, '_allowFileReadWrite', {
1668+
get: () => allowFileReadWrite,
1669+
set: (val) => { allowFileReadWrite = Boolean(val); },
1670+
enumerable: false,
1671+
configurable: false
1672+
});
1673+
}
16711674

16721675
return data;
16731676

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "data-context",
33
"description": "Watch data changes in the browser and node.js",
4-
"version": "2.0.0-beta.26",
4+
"version": "2.0.0-beta.27",
55
"license": "MIT",
66
"keywords": [
77
"on",

0 commit comments

Comments
 (0)