Skip to content

Commit

Permalink
rename attrib
Browse files Browse the repository at this point in the history
  • Loading branch information
tasiotas authored Jan 22, 2025
1 parent ccfc2ec commit dd9c450
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/runtime/plugin.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { computed, reactive, watch } from 'vue'

import type { ColorModeInstance } from './types'
import { defineNuxtPlugin, isVue2, isVue3, useRouter, useHead, useState } from '#imports'
import { globalName, storageKey, dataValue, disableTransition, storage, cookieAttribs } from '#color-mode-options'
import { globalName, storageKey, dataValue, disableTransition, storage, cookieAttrs } from '#color-mode-options'

Check failure on line 5 in src/runtime/plugin.client.ts

View workflow job for this annotation

GitHub Actions / ci

'cookieAttrs' is defined but never used. Allowed unused vars must match /^_/u

// Initialise to empty object to avoid hard error when hydrating app in test mode
const helper = (window[globalName] || {}) as unknown as {
Expand Down Expand Up @@ -80,10 +80,10 @@ export default defineNuxtPlugin((nuxtApp) => {
switch (storageType) {
case 'cookie':

if (Object.keys(cookieAttribs).length) {
if (Object.keys(ibs).length) {
let cookieString = storageKey + '=' + preference
for (const key in cookieAttribs) {
cookieString += `; ${key}=${cookieAttribs[key]}`
for (const key in ibs) {
cookieString += `; ${key}=${ibs[key]}`
}
window.document.cookie = cookieString
}
Expand Down

0 comments on commit dd9c450

Please # to comment.