Skip to content

Commit 80cb165

Browse files
committed
Changeset: Use in check to help TypeScript narrowing
1 parent 52f85e4 commit 80cb165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/static/js/Changeset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ const textLinesMutator = (lines) => {
647647
* @returns {string}
648648
*/
649649
const linesGet = (idx) => {
650-
if (lines.get) {
650+
if ('get' in lines) {
651651
return lines.get(idx);
652652
} else {
653653
return lines[idx];

0 commit comments

Comments
 (0)