Skip to content

Commit

Permalink
Merge pull request #264 from urbanspr1nter/master
Browse files Browse the repository at this point in the history
Making textarea example more clear by assigning the textarea value to the property of a document, rather than directly to the document.
  • Loading branch information
nateps committed Jan 30, 2019
2 parents 95c81b8 + 78f5e7f commit 494d1a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/textarea/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ var doc = connection.get('examples', 'textarea');
doc.subscribe(function(err) {
if (err) throw err;

var binding = new StringBinding(element, doc);
var binding = new StringBinding(element, doc, ['content']);
binding.setup();
});
2 changes: 1 addition & 1 deletion examples/textarea/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function createDoc(callback) {
doc.fetch(function(err) {
if (err) throw err;
if (doc.type === null) {
doc.create('', callback);
doc.create({ content: '' }, callback);
return;
}
callback();
Expand Down

0 comments on commit 494d1a5

Please sign in to comment.