diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-11-21 18:20:32 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-11-27 11:18:48 +0300 |
commit | 0bf740fa324df2971d0f38d4ff814095a2af4c83 (patch) | |
tree | db0fd4ac5b0c08b8bc281d67377f5c9917cffa0c /app/assets/javascripts/performance_bar | |
parent | 8ef51157950366f64cbd41ccf070e1facd104cae (diff) |
Replace `=== true` with `parseBoolean()`
Diffstat (limited to 'app/assets/javascripts/performance_bar')
-rw-r--r-- | app/assets/javascripts/performance_bar/services/performance_bar_service.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/performance_bar/services/performance_bar_service.js b/app/assets/javascripts/performance_bar/services/performance_bar_service.js index 3a496fa2ed8..d8c23c82f7f 100644 --- a/app/assets/javascripts/performance_bar/services/performance_bar_service.js +++ b/app/assets/javascripts/performance_bar/services/performance_bar_service.js @@ -1,6 +1,7 @@ import Vue from 'vue'; import _ from 'underscore'; import axios from '../../lib/utils/axios_utils'; +import { parseBoolean } from '~/lib/utils/common_utils'; let vueResourceInterceptor; @@ -41,7 +42,8 @@ export default class PerformanceBarService { // Vue Resource. const requestUrl = (response.config || response).url; const apiRequest = requestUrl && requestUrl.match(/^\/api\//); - const cachedResponse = response.headers && response.headers['x-gitlab-from-cache'] === 'true'; + const cachedResponse = + response.headers && parseBoolean(response.headers['x-gitlab-from-cache']); const fireCallback = requestUrl !== peekUrl && requestId && !apiRequest && !cachedResponse; return [fireCallback, requestId, requestUrl]; |