diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-11-21 16:20:32 +0100 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-11-27 09:18:48 +0100 |
commit | 0bf740fa324df2971d0f38d4ff814095a2af4c83 (patch) | |
tree | db0fd4ac5b0c08b8bc281d67377f5c9917cffa0c /app/assets/javascripts/profile | |
parent | 8ef51157950366f64cbd41ccf070e1facd104cae (diff) | |
download | gitlab-ce-0bf740fa324df2971d0f38d4ff814095a2af4c83.tar.gz |
Replace `=== true` with `parseBoolean()`
Diffstat (limited to 'app/assets/javascripts/profile')
-rw-r--r-- | app/assets/javascripts/profile/profile.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/profile/profile.js b/app/assets/javascripts/profile/profile.js index 8704a655b28..deacff5abe7 100644 --- a/app/assets/javascripts/profile/profile.js +++ b/app/assets/javascripts/profile/profile.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import axios from '~/lib/utils/axios_utils'; import flash from '../flash'; +import { parseBoolean } from '~/lib/utils/common_utils'; export default class Profile { constructor({ form } = {}) { @@ -80,7 +81,7 @@ export default class Profile { setRepoRadio() { const multiEditRadios = $('input[name="user[multi_file]"]'); - if (this.newRepoActivated || this.newRepoActivated === 'true') { + if (parseBoolean(this.newRepoActivated)) { multiEditRadios.filter('[value=on]').prop('checked', true); } else { multiEditRadios.filter('[value=off]').prop('checked', true); |