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

Commit

Permalink
Numeric state value type is now normalized before calling custom proc…
Browse files Browse the repository at this point in the history
…ess functions
  • Loading branch information
Alex committed Dec 18, 2022
1 parent f1d163e commit 6e708bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/history-explorer-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,12 @@ class HistoryCardState {

process(sample, process)
{
return process ? process(sample) : sample;
if( process ) {
let v = sample * 1.0;
if( isNaN(v) || !sample.length ) v = sample;
return process(v);
} else
return sample;
}

buildProcessFunction(p)
Expand Down

0 comments on commit 6e708bf

Please sign in to comment.