Skip to content

Commit

Permalink
fix lazy data creation in widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
nateps committed May 11, 2016
1 parent 76a79c6 commit 985a6ee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions widgets/index.js
Expand Up @@ -11,16 +11,16 @@ app.get('/', function(page, model, params, next) {
var data = model.at('widgets.data');
data.subscribe(function(err) {
if (err) return next(err);
data.setNull('color', 'Purple');
data.createNull({color: 'Purple'});
model.set('_page.numbers', [
{content: 'First'}
, {content: 'Second'}
, {content: 'Third'}
{content: 'First'},
{content: 'Second'},
{content: 'Third'}
]);
model.set('_page.colors', [
{content: 'Red'}
, {content: 'Orange'}
, {content: 'Purple'}
{content: 'Red'},
{content: 'Orange'},
{content: 'Purple'}
]);
page.render();
});
Expand Down

0 comments on commit 985a6ee

Please sign in to comment.