File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,9 @@ namespace ts {
290
290
const pnpapi = getPnpApi ( ) ;
291
291
292
292
const currentPackage = pnpapi . findPackageLocator ( `${ currentDirectory } /` ) ;
293
- Debug . assert ( ! ! currentPackage ) ;
293
+ if ( ! currentPackage ) {
294
+ return [ ] ;
295
+ }
294
296
295
297
const { packageDependencies} = pnpapi . getPackageInformation ( currentPackage ! ) ;
296
298
@@ -1645,8 +1647,9 @@ namespace ts {
1645
1647
1646
1648
function checkPnpExternalLibraryImport ( resolvedValue : Resolved ) {
1647
1649
const pnpApi = getPnpApi ( ) ;
1648
-
1649
1650
const ownerPackage = pnpApi . findPackageLocator ( resolvedValue . path ) ;
1651
+
1652
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
1650
1653
Debug . assert ( ! ! ownerPackage ) ;
1651
1654
1652
1655
const rootLocators = pnpApi . getDependencyTreeRoots ( ) ;
You can’t perform that action at this time.
0 commit comments