1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-30 00:44:20 +03:00

Add fallback in getMode method

This commit is contained in:
Brent Jackson 2018-08-11 10:58:36 -07:00
parent d23381d021
commit b2e1e53e06

View File

@ -152,7 +152,7 @@ export class SlideDeck extends React.Component {
getMode = () => {
const { mode } = querystring.parse(window.location.search.replace(/^\?/, ''))
this.setState({
mode: modes[mode]
mode: modes[mode] || modes.normal
})
}