Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 3be4ef0

Browse files
Łukasz SobekjasonLaster
authored andcommitted
Removes toJS from setInScopeLines (#5664)
1 parent a3cc534 commit 3be4ef0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/actions/ast/setInScopeLines.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,16 @@ function getOutOfScopeLines(outOfScopeLocations: AstLocation[]) {
2121

2222
export function setInScopeLines() {
2323
return ({ dispatch, getState }: ThunkArgs) => {
24-
const source = getSelectedSource(getState());
24+
const sourceRecord = getSelectedSource(getState());
2525
const outOfScopeLocations = getOutOfScopeLocations(getState());
2626

27-
if (!source || !source.get("text")) {
27+
if (!sourceRecord || !sourceRecord.text) {
2828
return;
2929
}
3030

31-
const linesOutOfScope = getOutOfScopeLines(
32-
outOfScopeLocations,
33-
source.toJS()
34-
);
31+
const linesOutOfScope = getOutOfScopeLines(outOfScopeLocations);
3532

36-
const sourceNumLines = getSourceLineCount(source.toJS());
33+
const sourceNumLines = getSourceLineCount(sourceRecord);
3734
const sourceLines = range(1, sourceNumLines + 1);
3835

3936
const inScopeLines = !linesOutOfScope

0 commit comments

Comments
 (0)