Skip to content

Commit

Permalink
fix: use optional chaining when validating relative paths in manifest…
Browse files Browse the repository at this point in the history
… asset completions (#258)
  • Loading branch information
byCedric authored Mar 13, 2024
1 parent 4799574 commit ee37364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manifestAssetCompletions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class ManifestAssetCompletionsProvider extends ExpoCompletionsProvider {

// Abort if the path is not relative, or if there is an extension already
const positionValue = getNodeValue(positionNode);
if (!positionValue || !positionValue.startsWith('.') || path.extname(positionValue)) {
if (!positionValue?.startsWith('.') || path.extname(positionValue)) {
return null;
}

Expand Down

0 comments on commit ee37364

Please sign in to comment.