add missing return

This commit is contained in:
Leo Horie 2015-03-30 10:55:34 -04:00
parent 1e9ddc637e
commit b6c2f70526

View file

@ -60,7 +60,7 @@ This mechanism is only intended to be used as a last resort optimization tool. I
The example below shows how to use a SubtreeDirective object to create a static header that doesn't incur diff costs once it has been rendered. This means that we are avoiding the creation of the header subtree (and therefore skipping the diff algorithm) altogether, but it also means that dynamic variables will NOT be updated within the header.
```
```javascript
var app = {}
//here's an example plugin that determines whether data has changes.
@ -78,7 +78,7 @@ app.bindOnce = (function() {
//here's the view
app.view = function() {
m(".layout", [
return m(".layout", [
app.bindOnce(function() {
//this only runs once in order to boost performance
//dynamic variables are not updated here