Changeset: Use in check to help TypeScript narrowing

This commit is contained in:
Richard Hansen 2021-10-25 05:17:18 -04:00
parent 4f4a775d9e
commit 1bbe0d9215

View file

@ -649,7 +649,7 @@ const textLinesMutator = (lines) => {
* @returns {string}
*/
const linesGet = (idx) => {
if (lines.get) {
if ('get' in lines) {
return lines.get(idx);
} else {
return lines[idx];