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 {
290290 const pnpapi = getPnpApi ( ) ;
291291
292292 const currentPackage = pnpapi . findPackageLocator ( `${ currentDirectory } /` ) ;
293- Debug . assert ( ! ! currentPackage ) ;
293+ if ( ! currentPackage ) {
294+ return [ ] ;
295+ }
294296
295297 const { packageDependencies} = pnpapi . getPackageInformation ( currentPackage ! ) ;
296298
@@ -1645,8 +1647,9 @@ namespace ts {
16451647
16461648 function checkPnpExternalLibraryImport ( resolvedValue : Resolved ) {
16471649 const pnpApi = getPnpApi ( ) ;
1648-
16491650 const ownerPackage = pnpApi . findPackageLocator ( resolvedValue . path ) ;
1651+
1652+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
16501653 Debug . assert ( ! ! ownerPackage ) ;
16511654
16521655 const rootLocators = pnpApi . getDependencyTreeRoots ( ) ;
You can’t perform that action at this time.
0 commit comments