fix broken serializer

This commit is contained in:
juliandescottes 2016-12-21 16:59:09 +01:00
parent 2bcd354342
commit dda566a218
2 changed files with 3 additions and 2 deletions

View File

@ -69,8 +69,9 @@
frames.forEach(layer.addFrame.bind(layer)); frames.forEach(layer.addFrame.bind(layer));
this.layers_[index] = layer; this.layers_[index] = layer;
this.onLayerLoaded_(); this.onLayerLoaded_();
}.bind(this)).catch(function () { }.bind(this)).catch(function (error) {
console.error('Failed to deserialize layer'); console.error('Failed to deserialize layer');
console.error(error);
}); });
return layer; return layer;

View File

@ -2,7 +2,7 @@
var ns = $.namespace('pskl.utils.serialization'); var ns = $.namespace('pskl.utils.serialization');
var areChunksValid = function (chunks) { var areChunksValid = function (chunks) {
return chunks.every(function (chunk) { return chunks.length && chunks.every(function (chunk) {
return chunk.base64PNG; return chunk.base64PNG;
}); });
}; };