add image alignment to Posts

This commit is contained in:
Amine Ben hammou
2018-05-23 05:17:51 +00:00
parent d7ab03b1c7
commit 4dd17e47ad
6 changed files with 26 additions and 11 deletions

View File

@@ -59,7 +59,7 @@ define([
},
parse: function (response) {
// If container has any blocks - add them to a collection
if (response.type === 'container' && _.has(response, 'blocks')) {
if (response.type === 'container' && _.has(response, 'blocks') && response.blocks.constructor === Array) {
response.blocks = new BlockCollection(response.blocks, {
parse: true
});