Skip to content

Commit

Permalink
chore: get rid of an instanceof (#19448)
Browse files Browse the repository at this point in the history
We shouldn't be doing this, ever.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr committed Mar 18, 2022
1 parent a257846 commit 6b0cacd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/core/lib/stack-synthesizers/_shared.ts
Expand Up @@ -95,7 +95,7 @@ function collectStackMetadata(stack: Stack) {
}

function findParentStack(node: IConstruct): Stack | undefined {
if (node instanceof Stack && node.nestedStackParent === undefined) {
if (Stack.isStack(node) && node.nestedStackParent === undefined) {
return node;
}

Expand Down Expand Up @@ -183,4 +183,4 @@ export function stackTemplateFileAsset(stack: Stack, session: ISynthesisSession)
packaging: FileAssetPackaging.FILE,
sourceHash,
};
}
}

0 comments on commit 6b0cacd

Please sign in to comment.