File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ export default function (ctx, inject) {
1414 let ignoreLUX = false
1515 let isFirstHit = null
1616
17- if ( ! options . enabled ) { return }
18-
1917 ctx . $lux = {
2018 // If logFirstHit is true, then let LUX log the first hit and ignore it if user tries to do it themselves
2119 pageLoading ( isLoading = true ) {
@@ -68,16 +66,17 @@ export default function (ctx, inject) {
6866 }
6967
7068 // client side setup the auto starter if requested
71- if ( process . client ) {
69+ if ( process . client && options . enabled ) {
7270 ctx . app . router . beforeEach ( ( to , from , next ) => {
7371 isFirstHit = ( isFirstHit === null )
7472
7573 ctx . $lux . routerBeforeEach ( to , from )
7674 next ( )
7775 } )
76+
7877 }
7978 // server side, inject the native LUX code on the fly
80- else if ( options . id ) {
79+ else if ( options . id && options . enabled ) {
8180 ctx . beforeNuxtRender ( ( ) => {
8281 const head = ctx . app . head
8382
You can’t perform that action at this time.
0 commit comments