summaryrefslogtreecommitdiffhomepage
path: root/app/components
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-05-18 22:33:00 +0200
committerErik Larkö <erik@mullvad.net>2017-05-23 15:56:21 +0200
commitdc93dcb8addd6e0deb0b984e2682fcfac1f27716 (patch)
tree52c43b6f8d8a0affc5c5c43c35f861c42a400128 /app/components
parent8034e21467dac5dfdacb94fde2f6aa5010b1b266 (diff)
downloadmullvadvpn-dc93dcb8addd6e0deb0b984e2682fcfac1f27716.tar.xz
mullvadvpn-dc93dcb8addd6e0deb0b984e2682fcfac1f27716.zip
Reasons to all asserts
Diffstat (limited to 'app/components')
-rw-r--r--app/components/Connect.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js
index d759c994fd..1859fe485e 100644
--- a/app/components/Connect.js
+++ b/app/components/Connect.js
@@ -398,12 +398,12 @@ export default class Connect extends Component {
}
toLngLat(pos) {
- assert(pos.length === 2);
+ assert(pos.length === 2, 'wrong number of coordinates in position');
return [ pos[1], pos[0] ];
}
toLngLatBounds(bounds) {
- assert(bounds.length % 2 === 0);
+ assert(bounds.length % 2 === 0, 'wrong number of sides in bounds');
let result = [];
for(let i = 0; i < bounds.length; i += 2) {
result.push(bounds.slice(i, i + 2).reverse());