Skip to content

Commit

Permalink
clarify return logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 4, 2019
1 parent a477ef3 commit 3257d92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/moon/dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,8 @@

data.onCreate = defaultValue(data.onCreate, noop);
data.onUpdate = defaultValue(data.onUpdate, noop);
data.onDestroy = defaultValue(data.onDestroy, noop); // If a `root` option is given, create a new instance and mount it.
data.onDestroy = defaultValue(data.onDestroy, noop); // If a `root` option is given, create a new instance and mount it, or else
// just return the constructor.

var root = data.root;
delete data.root;
Expand Down
3 changes: 2 additions & 1 deletion packages/moon/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export default function Moon(data) {
data.onUpdate = defaultValue(data.onUpdate, noop);
data.onDestroy = defaultValue(data.onDestroy, noop);

// If a `root` option is given, create a new instance and mount it.
// If a `root` option is given, create a new instance and mount it, or else
// just return the constructor.
let root = data.root;
delete data.root;

Expand Down

0 comments on commit 3257d92

Please sign in to comment.