Skip to content

Commit

Permalink
* Solved bug with Function Visualizer not working past formula 3
Browse files Browse the repository at this point in the history
* Added errors when in dev
  • Loading branch information
csprance committed Aug 5, 2022
1 parent a4f5945 commit fa8ac29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/graphtoy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ export default class Grapher {
error: getErrorMessage(err),
formula,
});
if (process.env.NODE_ENV !== 'production') {
console.error(err, fncString);
}
return false;
}
try {
Expand Down Expand Up @@ -646,9 +649,9 @@ export default class Grapher {
const g = this.mFormulas.find((f) => f.visualizer[1]);
const b = this.mFormulas.find((f) => f.visualizer[2]);
return [
r ? this.mFunctionFun[this.mFunctionVisualizer[r.id]] : null,
g ? this.mFunctionFun[this.mFunctionVisualizer[g.id]] : null,
b ? this.mFunctionFun[this.mFunctionVisualizer[b.id]] : null,
r ? this.mFunctionFun[r.id] : null,
g ? this.mFunctionFun[g.id] : null,
b ? this.mFunctionFun[b.id] : null,
];
}
}

0 comments on commit fa8ac29

Please sign in to comment.