diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-25 11:58:55 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-25 11:58:55 +0200 |
commit | f6e123f1ed36019a2ec5da1f97b27d22352b689a (patch) | |
tree | 326670b5cf1ff0cbdfbcd35d53f12fb858f874b2 /lib/models/plugin.js | |
parent | e1e4e7f01177d968e63f0b3a1830eda1adacb56b (diff) | |
download | gitbook-f6e123f1ed36019a2ec5da1f97b27d22352b689a.zip gitbook-f6e123f1ed36019a2ec5da1f97b27d22352b689a.tar.gz gitbook-f6e123f1ed36019a2ec5da1f97b27d22352b689a.tar.bz2 |
Add base rendering for template
Diffstat (limited to 'lib/models/plugin.js')
-rw-r--r-- | lib/models/plugin.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/models/plugin.js b/lib/models/plugin.js index 6891d7d..ed7ad82 100644 --- a/lib/models/plugin.js +++ b/lib/models/plugin.js @@ -87,12 +87,13 @@ Plugin.prototype.getFilters = function() { */ Plugin.prototype.getBlocks = function() { var blocks = this.getContent().get('blocks'); + blocks = blocks || Immutable.Map(); return blocks .map(function(block, blockName) { - block.name = blockName; - return new TemplateBlock(block); + return TemplateBlock.create(blockName, block); }) + .valueSeq() .toList(); }; |