Commit a04dc681 authored by Kev's avatar Kev

Replace testing against literal 'true' with parseBoolean call

parent 38477479
import { parseBoolean } from '../../lib/utils/common_utils';
/** /**
* Adds the line number property * Adds the line number property
* @param Object line * @param Object line
...@@ -17,7 +19,7 @@ export const parseLine = (line = {}, lineNumber) => ({ ...@@ -17,7 +19,7 @@ export const parseLine = (line = {}, lineNumber) => ({
* @param Number lineNumber * @param Number lineNumber
*/ */
export const parseHeaderLine = (line = {}, lineNumber) => ({ export const parseHeaderLine = (line = {}, lineNumber) => ({
isClosed: line.section_options?.collapsed === 'true', isClosed: parseBoolean(line.section_options?.collapsed),
isHeader: true, isHeader: true,
line: parseLine(line, lineNumber), line: parseLine(line, lineNumber),
lines: [], lines: [],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment