cmp-cc / vue-cookies

A simple Vue.js plugin for handling browser cookies
MIT License
408 stars 70 forks source link

Accept store multidimensional arrays #90

Open adrianoleiterodrigues opened 1 year ago

adrianoleiterodrigues commented 1 year ago

Why do not use typeof value instead value.constructor on set function to accept multidimensional array?

Change:

      if (value && value.constructor === Object) {
        value = JSON.stringify(value);
      }

To:

  if (value && typeof value === 'object') {
    value = JSON.stringify(value);
  }