Skip to content

Commit

Permalink
[Fix] correction to #80
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed May 18, 2019
1 parent 2042d47 commit 2f6a9aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/values/expressions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export default function extract(value) {
let { type } = expression;

while (type === 'TSNonNullExpression' || type === 'TSAsExpression') {
({ expression, type } = expression);
({ type } = expression);
if (expression.expression) {
({ expression } = expression);
}
}

if (TYPES[type] === undefined) {
Expand Down

0 comments on commit 2f6a9aa

Please sign in to comment.