Skip to content

Commit

Permalink
layout: nan check in lengthAbs
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Nov 7, 2023
1 parent a7cb9e7 commit 58e8bb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engine/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ export class LayoutNode extends Node {
}

val = parseFloat(val);
if (Number.isNaN(val)) val = 0;

switch (unit) {
case 'px': return val;
Expand Down

0 comments on commit 58e8bb1

Please sign in to comment.