Skip to content

Commit

Permalink
Another small crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Oct 19, 2022
1 parent 449e0ea commit a0e8331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/files/BrsFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1432,10 +1432,10 @@ export class BrsFile {

const scopesForFile = this.program.getScopesForFile(this);
const [scope] = scopesForFile;
scope.linkSymbolTable();

const expression = this.getClosestExpression(position);
if (expression) {
if (scope && expression) {
scope.linkSymbolTable();
let containingNamespace = expression.findAncestor<NamespaceStatement>(isNamespaceStatement)?.getName(ParseMode.BrighterScript);
const fullName = util.getAllDottedGetParts(expression)?.map(x => x.text).join('.');

Expand Down

0 comments on commit a0e8331

Please sign in to comment.