diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-08-08 14:21:48 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-08-08 16:25:34 +0200 |
| commit | 0942cf5e191a5edefe6790cf470f80edf9b0cee1 (patch) | |
| tree | e39ee3a500640bcb50bf3430f6dd0a3d5caea32d | |
| parent | 1693d67fc12ce189662c3147de872f25fcf40418 (diff) | |
| download | mullvadvpn-0942cf5e191a5edefe6790cf470f80edf9b0cee1.tar.xz mullvadvpn-0942cf5e191a5edefe6790cf470f80edf9b0cee1.zip | |
Cast to empty to ensure that all enum options are handled in a switch
| -rw-r--r-- | app/components/Connect.js | 2 | ||||
| -rw-r--r-- | app/components/CustomScrollbars.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js index 71ddb365f4..9d7f52f7b1 100644 --- a/app/components/Connect.js +++ b/app/components/Connect.js @@ -344,7 +344,7 @@ export default class Connect extends Component<Props, State> { case 'connected': return 'success'; default: - throw new Error(`Invalid ConnectionState: ${status}`); + throw new Error(`Invalid ConnectionState: ${(status: empty)}`); } } diff --git a/app/components/CustomScrollbars.js b/app/components/CustomScrollbars.js index be74bfddb5..a149faff75 100644 --- a/app/components/CustomScrollbars.js +++ b/app/components/CustomScrollbars.js @@ -176,7 +176,7 @@ export default class CustomScrollbars extends React.Component<Props, State> { return offsetTop - (scrollable.offsetHeight - child.clientHeight) * 0.5; default: - throw new Error(`Unknown enum type for ScrollPosition: ${scrollPosition}`); + throw new Error(`Unknown enum type for ScrollPosition: ${(scrollPosition: empty)}`); } } |
