From 5c3a3ebef253d368d72588d70ab461de4f2c37e7 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Thu, 30 Nov 2017 18:56:12 +0100 Subject: [PATCH] Improve readability with local variable --- v3/src/sound/webaudio/WebAudioSpriteSound.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/v3/src/sound/webaudio/WebAudioSpriteSound.js b/v3/src/sound/webaudio/WebAudioSpriteSound.js index d0db7cb49..0dc6b9a00 100644 --- a/v3/src/sound/webaudio/WebAudioSpriteSound.js +++ b/v3/src/sound/webaudio/WebAudioSpriteSound.js @@ -12,10 +12,11 @@ var WebAudioSpriteSound = new Class({ */ this.spritemap = manager.game.cache.json.get(key).spritemap; for (var markerName in this.spritemap) { + var marker = this.spritemap[markerName]; this.addMarker({ name: markerName, - start: this.spritemap[markerName].start, - duration: this.spritemap[markerName].end - this.spritemap[markerName].start, + start: marker.start, + duration: marker.end - marker.start, config: config }); }