diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-07-02 19:04:05 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-07-02 19:04:05 +0200 |
| commit | 56922a2b644a1dc6f4b872e2dfcd84571ca354a3 (patch) | |
| tree | 36d448da77e111e4641eb5771ea17b9ff3ccfbf3 /app | |
| parent | a2258433e93804117397624ecaea22d970d7e2b9 (diff) | |
| parent | 00e3c4464a001cd3b170fba071bd4a19f0147d0b (diff) | |
| download | mullvadvpn-56922a2b644a1dc6f4b872e2dfcd84571ca354a3.tar.xz mullvadvpn-56922a2b644a1dc6f4b872e2dfcd84571ca354a3.zip | |
Merge branch 'eslint-prefer-const'
Diffstat (limited to 'app')
| -rw-r--r-- | app/components/Connect.js | 2 | ||||
| -rw-r--r-- | app/components/HeaderBar.js | 2 | ||||
| -rw-r--r-- | app/components/Settings.js | 4 | ||||
| -rw-r--r-- | app/lib/backend.js | 2 | ||||
| -rw-r--r-- | app/lib/keyframe-animation.js | 4 | ||||
| -rw-r--r-- | app/main.js | 8 |
6 files changed, 11 insertions, 11 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js index fbb743854d..d14b768d44 100644 --- a/app/components/Connect.js +++ b/app/components/Connect.js @@ -316,7 +316,7 @@ export default class Connect extends Component<ConnectProps, ConnectState> { } networkSecurityStyle(): Types.Style { - let classes = [styles.status_security]; + const classes = [styles.status_security]; if (this.props.connection.status === 'connected') { classes.push(styles.status_security__secure); } else if (this.props.connection.status === 'disconnected') { diff --git a/app/components/HeaderBar.js b/app/components/HeaderBar.js index 69578bacfa..fcd7d40733 100644 --- a/app/components/HeaderBar.js +++ b/app/components/HeaderBar.js @@ -24,7 +24,7 @@ export default class HeaderBar extends Component<HeaderBarProps> { }; render() { - let containerClass = [ + const containerClass = [ styles['headerbar'], platformStyles[process.platform], styles['style_' + this.props.style], diff --git a/app/components/Settings.js b/app/components/Settings.js index 33fc371faa..ad90e034c4 100644 --- a/app/components/Settings.js +++ b/app/components/Settings.js @@ -67,10 +67,10 @@ export default class Settings extends Component<SettingsProps> { let isOutOfTime = false, formattedExpiry = ''; - let expiryIso = this.props.account.expiry; + const expiryIso = this.props.account.expiry; if (isLoggedIn && expiryIso) { - let expiry = moment(this.props.account.expiry); + const expiry = moment(this.props.account.expiry); isOutOfTime = expiry.isSameOrBefore(moment()); formattedExpiry = (expiry.fromNow(true) + ' left').toUpperCase(); } diff --git a/app/lib/backend.js b/app/lib/backend.js index c7b4ca53ec..b24b495449 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -264,7 +264,7 @@ export class Backend { async connect() { try { - let currentState = await this._ipc.getState(); + const currentState = await this._ipc.getState(); if (currentState.state === 'secured') { log.debug('Refusing to connect as connection is already secured'); this._store.dispatch(connectionActions.connected()); diff --git a/app/lib/keyframe-animation.js b/app/lib/keyframe-animation.js index 7a8968eb35..2961412230 100644 --- a/app/lib/keyframe-animation.js +++ b/app/lib/keyframe-animation.js @@ -124,7 +124,7 @@ export default class KeyframeAnimation { } play(options: KeyframeAnimationOptions = {}) { - let { startFrame, endFrame, beginFromCurrentState, advanceTo } = options; + const { startFrame, endFrame, beginFromCurrentState, advanceTo } = options; if (startFrame !== undefined && endFrame !== undefined) { if (startFrame < 0 || startFrame >= this._numFrames) { @@ -216,7 +216,7 @@ export default class KeyframeAnimation { return; } - let lastFrame = this._frameRange[this._reverse ? 0 : 1]; + const lastFrame = this._frameRange[this._reverse ? 0 : 1]; if (this._currentFrame === lastFrame) { // mark animation as finished if it's not repeating if (!this._repeat) { diff --git a/app/main.js b/app/main.js index c6bade7719..64c341dc60 100644 --- a/app/main.js +++ b/app/main.js @@ -255,9 +255,9 @@ const ApplicationMain = { switch (process.platform) { case 'win32': { // Windows: %ALLUSERSPROFILE%\{appname} - let programDataDirectory = process.env.ALLUSERSPROFILE; + const programDataDirectory = process.env.ALLUSERSPROFILE; if (programDataDirectory) { - let appDataDirectory = path.join(programDataDirectory, appDirectoryName); + const appDataDirectory = path.join(programDataDirectory, appDirectoryName); return path.join(appDataDirectory, rpcAddressFileName); } else { throw new Error('Missing %ALLUSERSPROFILE% environment variable'); @@ -413,7 +413,7 @@ const ApplicationMain = { }, _addContextMenu(window: BrowserWindow) { - let menuTemplate = [ + const menuTemplate = [ { role: 'cut' }, { role: 'copy' }, { role: 'paste' }, @@ -425,7 +425,7 @@ const ApplicationMain = { window.webContents.on( 'context-menu', (_e: Event, props: { x: number, y: number, isEditable: boolean }) => { - let inspectTemplate = [ + const inspectTemplate = [ { label: 'Inspect element', click() { |
