8000 Merge pull request #5194 from bootstrap-vue/dev · bootstrap-vue/bootstrap-vue@5f7f2e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f7f2e5

Browse files
authored
Merge pull request #5194 from bootstrap-vue/dev
chore: fix docs header version dropdown
2 parents a7b17e1 + 1253ba2 commit 5f7f2e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/components/header.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,25 +201,25 @@ export default {
201201
isZeitNow() {
202202
return Boolean(process.env.ZEIT_NOW)
203203
},
204+
branchName() {
205+
return this.isZeitNow ? process.env.ZEIT_BRANCH || '' : ''
206+
},
204207
isDev() {
205208
// In our case, `production` is the dev branch preview (Netlify)
206209
return (
207210
(this.isNetlify && process.env.NETLIFY_CONTEXT === 'production') ||
208-
(this.isZeitNow && process.env.ZEIT_BRANCH === 'dev')
211+
(this.isZeitNow && this.branchName === 'dev')
209212
)
210213
},
211214
isPR() {
212215
return (
213216
(this.isNetlify && process.env.PULL_REQUEST && process.env.REVIEW_ID) ||
214-
(this.isZeitNow && !this.isDev && !process.env.ZEIT_BRANCH !== 'master')
217+
(this.isZeitNow && !this.isDev && this.branchName !== 'master')
215218
)
216219
},
217220
prId() {
218221
return this.isPR ? process.env.REVIEW_ID : ''
219222
},
220-
branchName() {
221-
return this.isZeitNow ? process.env.ZEIT_BRANCH || '' : ''
222-
},
223223
dropdownText() {
224224
if (this.isPR) {
225225
return this.prId ? `Pull #${this.prId}` : 'Pull Request'

0 commit comments

Comments
 (0)
0