Skip to content

Commit

Permalink
Changeset: Use in check to help TypeScript narrowing
Browse files Browse the repository at this point in the history
  • Loading branch information
rhansen committed Nov 9, 2021
1 parent 52f85e4 commit 80cb165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/static/js/Changeset.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ const textLinesMutator = (lines) => {
* @returns {string}
*/
const linesGet = (idx) => {
if (lines.get) {
if ('get' in lines) {
return lines.get(idx);
} else {
return lines[idx];
Expand Down

0 comments on commit 80cb165

Please sign in to comment.