We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b00f216 commit 584edc8Copy full SHA for 584edc8
hello/index.js
@@ -4,7 +4,12 @@ app.loadViews(__dirname);
4
// Routes render on client as well as server
5
app.get('/', function(page, model) {
6
// Subscribe specifies the data to sync
7
- model.subscribe('hello.message', function() {
+ var message = model.at('hello.message');
8
+ message.subscribe(function(err) {
9
+ if (err) return next(err);
10
+ if (message.get() == null) {
11
+ message.create('');
12
+ }
13
page.render();
14
});
15
0 commit comments