-
-
Notifications
You must be signed in to change notification settings - Fork 722
Closed
Copy link
Labels
Description
in some edge cases (looks like problem in || and &&):
const notification = { type: 'PRIMARY' };
switch (true) {
case notification.type === 'PRIMARY' || notification.type === 'SECONDARY':
// TODO
break;
case notification.type === 'SECONDARY':
// TODO
break;
case notification.type === 'OUTLINE' || notification.type === 'SECONDARY':
// TODO
break;
case notification.type === 'ETC':
// TODO
break;
} const notification = { type: 'PRIMARY' };
const other = true;
switch (true) {
case notification.type === 'PRIMARY' && other:
// TODO
break;
case notification.type === 'SECONDARY':
// TODO
break;
case notification.type === 'OUTLINE' && other:
// TODO
break;
case notification.type === 'ETC':
// TODO
break;
}bgoscinski