Skip to content

Commit 12b2181

Browse files
Remove globalQueryConfig duplicate creation
1 parent 60c56fe commit 12b2181

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/templates/plugin.template.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ import CacheService from '../services/CacheService'
44
export default (ctx, inject) => {
55
// Create new delivery client Instance
66
let settings = JSON.parse('KENTICOOPTIONS')
7-
8-
// Adds globalQueryConfig if not already set
9-
if(!settings.globalQueryConfig)
10-
{
11-
settings.globalQueryConfig = {}
12-
}
7+
138
// Adds customHeaders if not already set
149
if(!settings.globalQueryConfig.customHeaders)
1510
{
1611
settings.globalQueryConfig.customHeaders = []
1712
}
13+
1814
// Adds X-KC-SOURCE to identify this module is in use
1915
settings.globalQueryConfig.customHeaders.push(
2016
{ header: 'X-KC-SOURCE', value: 'kentico-kontent-nuxt-module' }

0 commit comments

Comments
 (0)