diff --git a/Changelog.md b/Changelog.md index a5878f5..953b810 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,11 @@ Changelog ========= +## version 3.2.1 (2021-04-03) + ++ Fixes an undefined property error. + + ## version 3.2.0 (2021-04-03) ### Added: {docsify-ignore} diff --git a/package.json b/package.json index faf3f7d..8f06f67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "audiomotion-analyzer", "description": "High-resolution real-time graphic audio spectrum analyzer JavaScript module with no dependencies.", - "version": "3.2.0", + "version": "3.2.1", "main": "./src/audioMotion-analyzer.js", "module": "./src/audioMotion-analyzer.js", "types": "./src/index.d.ts", diff --git a/src/audioMotion-analyzer.js b/src/audioMotion-analyzer.js index 3efcad9..36ac07c 100644 --- a/src/audioMotion-analyzer.js +++ b/src/audioMotion-analyzer.js @@ -2,12 +2,12 @@ * audioMotion-analyzer * High-resolution real-time graphic audio spectrum analyzer JS module * - * @version 3.2.0 + * @version 3.2.1 * @author Henrique Avila Vianna * @license AGPL-3.0-or-later */ -const VERSION = '3.2.0'; +const VERSION = '3.2.1'; // internal constants const TAU = 2 * Math.PI, @@ -1450,6 +1450,8 @@ export default class AudioMotionAnalyzer { */ _calcBars() { + const bars = this._bars = []; // initialize object property + if ( ! this._ready ) return; @@ -1460,9 +1462,7 @@ export default class AudioMotionAnalyzer { maxFreq = this._maxFreq, minFreq = this._minFreq; - let minLog, - logWidth, - bars = []; + let minLog, logWidth; if ( ! this._isOctaveBands ) { // Discrete frequencies or area fill modes @@ -1565,9 +1565,6 @@ export default class AudioMotionAnalyzer { } ); } - // update bars - this._bars = bars; - // save these for scale generation this._minLog = minLog; this._logWidth = logWidth;