From 1bbe0d921514cec6a118df4c3e1b7ba276c7ca7b Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 25 Oct 2021 05:17:18 -0400 Subject: [PATCH] Changeset: Use `in` check to help TypeScript narrowing --- src/static/js/Changeset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js index d261db74899..21de89c43da 100644 --- a/src/static/js/Changeset.js +++ b/src/static/js/Changeset.js @@ -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];