From 39359c41f1705d185f169f6a278f283a3cd64afa Mon Sep 17 00:00:00 2001 From: dvschuyl Date: Tue, 1 Sep 2026 16:54:36 +0200 Subject: [PATCH] Add nil check --- tsc/internal/ast/ast.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tsc/internal/ast/ast.go b/tsc/internal/ast/ast.go index a305269ca1f6b..07793ffb354e5 100644 --- a/tsc/internal/ast/ast.go +++ b/tsc/internal/ast/ast.go @@ -101,6 +101,9 @@ func (f *NodeFactory) AsNodeFactory() *NodeFactory { } func updateNode(updated *Node, original *Node, hooks NodeFactoryHooks) *Node { + if updated == nil { + return nil; + } if updated != original { updated.Flags = original.Flags updated.Loc = original.Loc