Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
deal with array of empty exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Aug 13, 2019
1 parent 78b9e3a commit 53255dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Spectra.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Spectra {
scaleSD: true,
exclusions: []
}
: options.normalization;
: JSON.parse(JSON.stringify(options.normalization));
if (this.normalizationOptions.from > this.normalizationOptions.to) {
[this.normalizationOptions.from, this.normalizationOptions.to] = [
this.normalizationOptions.to,
Expand All @@ -23,7 +23,7 @@ export class Spectra {
}
if (Array.isArray(this.normalizationOptions.exclusions)) {
this.normalizationOptions.exclusions = this.normalizationOptions.exclusions.filter(
(exclusion) => !exclusion.ignore
(exclusion) => exclusion && !exclusion.ignore
);
}
this.data = [];
Expand Down

0 comments on commit 53255dc

Please sign in to comment.