Skip to content

Commit

Permalink
Fix the breakage
Browse files Browse the repository at this point in the history
POS could be nil.
  • Loading branch information
dgutov committed Dec 25, 2017
1 parent a495394 commit d72ed20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js2-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -11092,14 +11092,15 @@ and expression closure style is also supported

{ get foo() x, set foo(x) _x = x }

POS is the start position of the `get' or `set' keyword.
POS is the start position of the `get' or `set' keyword, if any.
PROP is the `js2-name-node' representing the property name.
TYPE-STRING is a string `get', `set', `*', or nil, indicating a found keyword."
(let* ((type (or (cdr (assoc type-string '(("get" . GET)
("set" . SET)
("async" . ASYNC))))
'FUNCTION))
result end
(pos (or pos (js2-current-token-beg)))
(_ (js2-must-match js2-LP "msg.no.paren.parms"))
(fn (js2-parse-function 'FUNCTION_EXPRESSION pos
(string= type-string "*")
Expand Down

0 comments on commit d72ed20

Please sign in to comment.