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 13, 2021
1 parent a13d8a2 commit d609ea7
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 @@ -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];
Expand Down

0 comments on commit d609ea7

Please sign in to comment.