File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/cdk/schematics/ng-update Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,13 @@ export class DevkitFileSystem extends FileSystem {
5353 try {
5454 this . _tree . get ( dirPath ) ;
5555 } catch ( e ) {
56- // Note: We do not use an `instanceof` check here. It could happen that the devkit version
57- // used by the CLI is different than the one we end up loading. This can happen depending
58- // on how Yarn/NPM hoists the NPM packages / whether there are multiple versions installed.
59- if ( e instanceof Error && e . constructor . name === 'PathIsDirectoryException' ) {
56+ // Note: We do not use an `instanceof` check here. It could happen that
57+ // the devkit version used by the CLI is different than the one we end up
58+ // loading. This can happen depending on how Yarn/NPM hoists the NPM
59+ // packages / whether there are multiple versions installed. Typescript
60+ // throws a compilation error if the type isn't specified and we can't
61+ // check the type, so we have to cast the error output to any.
62+ if ( ( e as any ) . constructor . name === 'PathIsDirectoryException' ) {
6063 return true ;
6164 }
6265 }
You can’t perform that action at this time.
0 commit comments