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

fix(ngCookie): convert non-string values to string #6220

Closed
wants to merge 1 commit into from

Conversation

caitp
Copy link
Contributor

@caitp caitp commented Feb 12, 2014

Previously, non-string values stored in $cookies would be removed, without warning the user, and
causing difficulty debugging. Now, the value is converted to string before being stored, and the
value is not dropped. Serialization may be customized using the toString() method of an object's
prototype.

Closes #6151

@caitp caitp added cla: yes and removed cla: no labels Feb 19, 2014
@caitp caitp changed the title feat(ngCookie): serialize numeric $cookies properties as strings fix(ngCookie): log warning when attempting to store a non-string value Mar 18, 2014
@caitp caitp added this to the 1.3.0-beta.3 milestone Mar 18, 2014
@caitp caitp changed the title fix(ngCookie): log warning when attempting to store a non-string value fix(ngCookie): convert non-string values to string Mar 19, 2014
Previously, non-string values stored in $cookies would be removed, without warning the user, and
causing difficulty debugging. Now, the value is converted to string before being stored, and the
value is not dropped. Serialization may be customized using the toString() method of an object's
prototype.

Closes angular#6151
@caitp caitp closed this in 3652831 Mar 19, 2014
caitp added a commit that referenced this pull request Mar 21, 2014
Previously, non-string values stored in $cookies would be removed, without warning the user, and
causing difficulty debugging. Now, the value is converted to string before being stored, and the
value is not dropped. Serialization may be customized using the toString() method of an object's
prototype.

Closes #6151
Closes #6220
tbosch pushed a commit to tbosch/angular.js that referenced this pull request Mar 21, 2014
Previously, non-string values stored in $cookies would be removed, without warning the user, and
causing difficulty debugging. Now, the value is converted to string before being stored, and the
value is not dropped. Serialization may be customized using the toString() method of an object's
prototype.

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

Successfully merging this pull request may close these issues.

Saving an integer with $cookies doesn't work, and doesn't throw an error.
2 participants