Skip to content

Commit 1dafd26

Browse files
author
Jonas Gossens
committed
🐛 Fix bug that modeswitch with one mode is shown
1 parent f7568bd commit 1dafd26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/react-chayns-modeswitch/component/ModeSwitch.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default class ModeSwitch extends Component {
218218
customModes -= 1;
219219
}
220220

221-
return (show || (show === null && (!ModeSwitch.adminSwitchSupport || modes.length > 2 || customModes))) && chayns.env.user.isAuthenticated;
221+
return (show || (show === null && modes.length > 1 && (!ModeSwitch.adminSwitchSupport || modes.length > 2 || customModes))) && chayns.env.user.isAuthenticated;
222222
}
223223

224224
render() {

0 commit comments

Comments
 (0)