Skip to content

Commit 5331f76

Browse files
committed
fix: Status should not go next when not match
1 parent ff13be8 commit 5331f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Popup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Popup extends Component<PopupProps, PopupState> {
162162
const queue: PopupStatus[] = ['measure', 'align', null, 'beforeMotion', 'motion'];
163163
const index = queue.indexOf(status);
164164
const nextStatus = queue[index + 1];
165-
if (nextStatus) {
165+
if (index !== -1 && nextStatus) {
166166
this.setStateOnNextFrame({ status: nextStatus });
167167
}
168168
}

0 commit comments

Comments
 (0)