Skip to content

Commit d609ea7

Browse files
committed
Changeset: Use in check to help TypeScript narrowing
1 parent a13d8a2 commit d609ea7

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
@@ -649,7 +649,7 @@ const textLinesMutator = (lines) => {
649649
* @returns {string}
650650
*/
651651
const linesGet = (idx) => {
652-
if (lines.get) {
652+
if ('get' in lines) {
653653
return lines.get(idx);
654654
} else {
655655
return lines[idx];

0 commit comments

Comments
 (0)