Skip to content

Commit

Permalink
Fix bug where old config files had bandpass filter added when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed Mar 28, 2023
1 parent 22bac18 commit e18b63a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion saveLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,10 @@ function useLoadedConfiguration (err, currentConfig, data, callback) {

const passFiltersEnabled = (typeof jsonObj.passFiltersEnabled === 'undefined') ? replacementValues.passFiltersEnabled : jsonObj.passFiltersEnabled;

const filterType = (typeof jsonObj.filterType === 'undefined') ? replacementValues.filterType : jsonObj.filterType;
let filterType = (typeof jsonObj.filterType === 'undefined') ? replacementValues.filterType : jsonObj.filterType;

// With older versions of the config app, filter type didn't exist
filterType = !passFiltersEnabled ? 'none' : filterType;

const lowerFilter = (typeof jsonObj.lowerFilter === 'undefined') ? replacementValues.lowerFilter : jsonObj.lowerFilter;
const higherFilter = (typeof jsonObj.higherFilter === 'undefined') ? replacementValues.higherFilter : jsonObj.higherFilter;
Expand Down

0 comments on commit e18b63a

Please sign in to comment.