Skip to content

Commit 014c760

Browse files
author
Felipe
committed
Don't choke on malformed identifiers
Closes #89
1 parent 0e7fa6b commit 014c760

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rjsx-mode.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,10 @@ Sets KID's parent to N."
286286

287287
(defun rjsx-member-full-name (n)
288288
"Return the string with N's combined names together."
289-
(mapconcat 'rjsx-identifier-full-name (rjsx-member-idents n) "."))
289+
(mapconcat #'rjsx-identifier-full-name
290+
;; Fix #89. There could be an error node here
291+
(cl-remove-if-not #'rjsx-identifier-p (rjsx-member-idents n))
292+
"."))
290293

291294
(cl-defstruct (rjsx-attr
292295
(:include js2-node (type rjsx-JSX-ATTR))

0 commit comments

Comments
 (0)