Add nullcheck to snap-to-grid setting (#858)

This commit is contained in:
bymyself
2024-09-16 19:11:39 -07:00
committed by GitHub
parent 3fe4b4b856
commit f9fd0f59ff

View File

@@ -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
}
})