Skip to content

Commit

Permalink
[stylus mode] Fix a crash in indentation code
Browse files Browse the repository at this point in the history
FIX: Fix a bug where the Stylus mode would crash when queried for indentation.

Closes codemirror/dev#1424
  • Loading branch information
marijnh committed Aug 15, 2024
1 parent 3ebc5f3 commit ce9520c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/stylus.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ export const stylus = {
ch = textAfter && textAfter.charAt(0),
indent = cx.indent,
lineFirstWord = firstWordOfLine(textAfter),
lineIndent = iCx.lineIndent(iCx.pos),
lineIndent = cx.line.indent,
prevLineFirstWord = state.context.prev ? state.context.prev.line.firstWord : "",
prevLineIndent = state.context.prev ? state.context.prev.line.indent : lineIndent;

Expand Down

0 comments on commit ce9520c

Please sign in to comment.