Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error on Cookies.get() function #133

Closed
mlenormand opened this issue Oct 21, 2016 · 5 comments
Closed

Error on Cookies.get() function #133

mlenormand opened this issue Oct 21, 2016 · 5 comments

Comments

@mlenormand
Copy link

I get the following error when trying to retrieve the cookie 'cookie1' with the Cookies.get('cookie1') instruction :
quasar.common.js?e3df:5653 Uncaught TypeError: Cannot set property 'cookie2' of undefinedget$1 @ quasar.common.js?e3df:5653setCurrentLanguage @ store.js?a259:43(anonymous function) @ app.js?7ac9:25(anonymous function) @ app.js:1363__webpack_require__ @ app.js:556fn @ app.js:87(anonymous function) @ app.js:610__webpack_require__ @ app.js:556(anonymous function) @ app.js:579(anonymous function) @ app.js:582

Note : the error talks about cookie2 and I ask Quasar to get the 'cookie1', it's not a mistake.

The issue concerns the following Quasar code. result is probably undefined when executing the result[name] = cookie; instruction

function get$1(key) {
  var result = key ? undefined : {},
      cookies = document.cookie ? document.cookie.split(' ') : [],
      i = 0,
      l = cookies.length,
      parts = void 0,
      name = void 0,
      cookie = void 0;

  for (; i < l; i++) {
    parts = cookies[i].split('=');
    name = decode(parts.shift());
    cookie = parts.join('=');

    if (key === name) {
      result = read(cookie);
      break;
    }

    result[name] = cookie;
  }
@rstoenescu
Copy link
Member

Will investigate. Thanks for opening this before releasing v0.8.

@mlenormand
Copy link
Author

I'm developing a business app using Quasar v0.7 and I can't upgrade now to Quasar v0.8.2/Vue2.0 (it' on my roadmap, but after the first release to my customer). How can I patch my code with this bug fix without upgrading Quasar ? More generally, what are the steps to patch a Quasar app from bug fixes ?

@rstoenescu
Copy link
Member

I'll release v0.7.1 with this fix later today then. It's easier so.

@mlenormand
Copy link
Author

Thanks !

On Wed, Oct 26, 2016 9:47 AM, Razvan Stoenescu notifications@github.com
wrote:
I'll release v0.7.1 with this fix later today then. It's easier so.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@rstoenescu
Copy link
Member

rstoenescu commented Oct 26, 2016

Just backported the fix to v0.7.1 and released it. Change your package.json to point to `"quasar-framework": "0.7.1"'. Then npm install it. Enjoy!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants