From f9fd0f59ffc14fe3607fbda5bc00676b06dd813e Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 16 Sep 2024 19:11:39 -0700 Subject: [PATCH] Add nullcheck to snap-to-grid setting (#858) --- src/extensions/core/snapToGrid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/core/snapToGrid.ts b/src/extensions/core/snapToGrid.ts index 81791e260..c31f32f1f 100644 --- a/src/extensions/core/snapToGrid.ts +++ b/src/extensions/core/snapToGrid.ts @@ -34,7 +34,7 @@ app.registerExtension({ 'When dragging and resizing nodes while holding shift they will be aligned to the grid, this controls the size of that grid.', defaultValue: LiteGraph.CANVAS_GRID_SIZE, onChange(value) { - LiteGraph.CANVAS_GRID_SIZE = +value + LiteGraph.CANVAS_GRID_SIZE = +value || 10 } })