Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Referencing lastCookies.length when length property does not exist #1712

Closed
benmccann opened this issue Dec 16, 2012 · 1 comment
Closed

Comments

@benmccann
Copy link
Contributor

In src/ng/browser.js there's a reference to lastCookies.length:

      if (lastCookies.length > 20) {
        $log.warn("Cookie '"+ name +"' possibly not set or overflowed because too many cookies " +
          "were already set (" + lastCookies.length + " > 20 )");
      }

However, lastCookies is an Object and Objects do not have a length property, so this if statement will never be triggered.

@IgorMinar
Copy link
Contributor

correct. this is a bug. looks like when I wrote this, I didn't finish the test and the unfinished test made it look like this feature was implemented correctly. my fault.

IgorMinar added a commit that referenced this issue Jan 8, 2013
the warning is defunct (and the test is incorrect) so obviously nobody is using
it and it just takes up space.

also the browser behavior varies (ff and chrome allow up to 150 cookies, safari
even more), so it's not very useful.

Closes #1712
jamessharp pushed a commit to jamessharp/angular.js that referenced this issue Jan 18, 2013
the warning is defunct (and the test is incorrect) so obviously nobody is using
it and it just takes up space.

also the browser behavior varies (ff and chrome allow up to 150 cookies, safari
even more), so it's not very useful.

Closes angular#1712
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants