* lisp/treesit.el (treesit-simple-indent-presets): Have n-p-gp
check for grandparent's presence before checking its type.
(string-match-p
parent-t (treesit-node-type parent)))
(or (null grand-parent-t)
- (string-match-p
- grand-parent-t
- (treesit-node-type
- (treesit-node-parent parent))))))))
+ (and
+ (treesit-node-parent parent)
+ (string-match-p
+ grand-parent-t
+ (treesit-node-type
+ (treesit-node-parent parent)))))))))
(cons 'no-node (lambda (node &rest _) (null node)))
(cons 'parent-is (lambda (type)
(lambda (_n parent &rest _)