diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/lib/tray-animator.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/lib/tray-animator.js b/app/lib/tray-animator.js index b018a67a56..75a4079112 100644 --- a/app/lib/tray-animator.js +++ b/app/lib/tray-animator.js @@ -66,7 +66,15 @@ export class TrayAnimation { assert(images.length > 0); this._source = images.slice(); - this._nativeImages = images.map(path => nativeImage.createFromPath(path)) + this._nativeImages = images.map((pathOrNativeImage) => { + if(typeof(pathOrNativeImage) === 'string') { + return nativeImage.createFromPath(path); + } else if(typeof(pathOrNativeImage) === 'NativeImage') { + return pathOrNativeImage; + } + return nativeImage.createEmpty(); + }); + this._speed = 200; // ms this._repeat = false; this._reverse = false; |
