From 254411badfefc8436073605afa68e94df5c758a9 Mon Sep 17 00:00:00 2001 From: Kabir Shah Date: Sat, 6 Apr 2019 14:18:52 -0700 Subject: [PATCH] fix comment --- packages/moon/dist/moon.js | 3 ++- packages/moon/src/index.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/moon/dist/moon.js b/packages/moon/dist/moon.js index c00638dd..d7f4548f 100644 --- a/packages/moon/dist/moon.js +++ b/packages/moon/dist/moon.js @@ -883,7 +883,8 @@ if (onDestroy !== undefined) { data.events.destroy.push(onDestroy); - } // Initialize the component constructor with the given data. + } // Initialize the component constructor with the given data, given view, and + // default methods. function MoonComponent() { diff --git a/packages/moon/src/index.js b/packages/moon/src/index.js index c9e77d36..a5667973 100644 --- a/packages/moon/src/index.js +++ b/packages/moon/src/index.js @@ -169,10 +169,12 @@ export default function Moon(data) { data.events.destroy.push(onDestroy); } - // Initialize the component constructor with the given data. + // Initialize the component constructor with the given data, given view, and + // default methods. function MoonComponent() { this.view = view(); } + MoonComponent.prototype = data; MoonComponent.prototype.create = create; MoonComponent.prototype.update = update;