Fix missing variable and remove unnecessesary if

This commit is contained in:
Dávid Szabó 2016-09-23 13:32:23 +02:00 committed by Julian Descottes
parent c97ce34e6e
commit 9c96c7eaf2

View File

@ -30,14 +30,9 @@
var key1 = frame.getHash();
if (cache[key1]) {
processedFrame = cache[key1];
} else if (frame instanceof pskl.model.frame.RenderedFrame) {
// Cannot use 2nd level cache with rendered frames
var callbackFirstLvlCacheOnly = this.onProcessorComplete_.bind(this, deferred, cache, key1);
this.frameProcessor(frame, callbackFirstLvlCacheOnly);
} else {
var callback = this.onProcessorComplete_.bind(this, deferred, cache, key1);
this.frameProcessor(frame, callback);
cache[key1] = processedFrame;
}
if (processedFrame) {