Skip to content

Commit

Permalink
float variable equal to math.inf should be displayed accordingly in d…
Browse files Browse the repository at this point in the history
…ebugger (jupyterlab#15487)
  • Loading branch information
ashna1jain authored Dec 10, 2023
1 parent 6190f4c commit 1c2741f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/debugger/src/panels/variables/tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ interface IVariableComponentProps {
}

function _prepareDetail(variable: IDebugger.IVariable) {
if (
variable.type === 'float' &&
(variable.value == 'inf' || variable.value == '-inf')
) {
return variable.value;
}
const detail = convertType(variable);
if (variable.type === 'float' && isNaN(detail as number)) {
// silence React warning:
Expand Down

0 comments on commit 1c2741f

Please sign in to comment.