Skip to content

Commit 1c17000

Browse files
committed
- return Promise in init if datadom is inited with node to unify init
return value in different cases.
1 parent a41cf13 commit 1c17000

File tree

8 files changed

+18
-9
lines changed

8 files changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.0.4
2+
3+
- return Promise in init if datadom is inited with node to unify init return value in different cases.
4+
5+
16
# 0.0.3
27

38
- fix bug: update with ops should wrap ops in Array when applying.

dist/datadom.js

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

dist/datadom.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
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
@@ -3,7 +3,7 @@
33
"name": "@plotdb/datadom",
44
"license": "MIT",
55
"description": "dom serializer / deserializer",
6-
"version": "0.0.3",
6+
"version": "0.0.4",
77
"files": [
88
"dist/**/*"
99
],

src/datadom.ls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ main = (opt = {}) ->
143143
main.prototype = Object.create(Object.prototype) <<< do
144144
plugin: (o,p) -> if @plugins.length => @plugins.map(-> it o,p) else o
145145
init: ->
146-
if @node => @data = serialize(@node, (o,p) ~> @plugin o,p)
146+
if @node => Promise.resolve!then ~> @data = serialize(@node, (o,p) ~> @plugin o,p)
147147
else
148148
deserialize(@data, (o,p) ~> @plugin o,p)
149149
# node might be a proxy which will be updated once promise is resolved.

web/static/assets/lib/datadom/dev/datadom.js

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

0 commit comments

Comments
 (0)