fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

Indenting inside function() causing "wrong-type-argument number-or-marker-p nil" #1176

Closed hlolli closed 2 years ago

hlolli commented 3 years ago

Here's a small example of jsx code

import React from "react";

function Component() {
|
}

I press tab and I get the following stacktrace

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  web-mode-javascript-indentation(86 0 nil "jsx" 1)
  web-mode-indent-line()
  indent--funcall-widened(web-mode-indent-line)
  indent-for-tab-command(nil)
  funcall-interactively(indent-for-tab-command nil)
  call-interactively(indent-for-tab-command nil nil)
  command-execute(indent-for-tab-command)

My version web-mode 20210131.1758 installed

fxbois commented 3 years ago

could you post the output of web-mode-debug I can not trigger the bug here