Change variables to constants for invariant values

Use const instead of let to help signify that the initialized values are not expected to change. This commit resolves some review requests on APlayer PR #175.
This commit is contained in:
Eric Robinson 2017-12-14 11:04:08 -05:00
parent 80b84affdc
commit 1a4ea7a4ed
1 changed files with 2 additions and 2 deletions

View File

@ -525,7 +525,7 @@ class APlayer {
}
});
let pauseHandler = () => {
const pauseHandler = () => {
if (this.button && (this.button.classList.contains('aplayer-pause') || this.ended)) {
this.ended = false;
this.button.classList.remove('aplayer-pause');
@ -867,7 +867,7 @@ class APlayer {
* @param {Array} newMusic
*/
addMusic(newMusic) {
let wasSingle = !this.isMultiple();
const wasSingle = !this.isMultiple();
this.option.music = this.option.music.concat(newMusic);