Skip to content

Commit

Permalink
Merge pull request #14 from maxks/main
Browse files Browse the repository at this point in the history
Version 1.3.3
  • Loading branch information
maxks authored Mar 19, 2021
2 parents 1ffa968 + c5f6cb6 commit 2cc0375
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class instance extends instance_skel {

fadeLevel(fd, ch, mx, ct, lv, oMB, oLB, cnfg = this.config.level) {
var self = this
if (fd == 0) {
if (fd == 0 || fd === undefined) {
return self.setLevel(ch, mx, ct, lv, oMB, oLB, cnfg)
} else {
if (this.midiSocket !== undefined) {
Expand Down
12 changes: 8 additions & 4 deletions upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ module.exports = {
addUpgradeScripts : function() {
// From version 1.3.2 => 1.3.3
this.addUpgradeScript((config, actions, releaseActions, feedbacks) => {
let checkUpgrade = ((action) => {
let changed = false

let checkUpgrade = ((action, changed) => {
switch (action.action) {
case 'chlev_to_mix':
case 'grplev_to_mix':
Expand All @@ -20,17 +22,19 @@ module.exports = {
}
break;
}

return changed
})

for (let k in actions) {
checkUpgrade(actions[k])
changed = checkUpgrade(actions[k], changed)
}

for (let k in releaseActions) {
checkUpgrade(releaseActions[k])
changed = checkUpgrade(releaseActions[k], changed)
}

return true
return changed
})
}
}

0 comments on commit 2cc0375

Please sign in to comment.