vendor/assets/javascripts/angular-cookies.js in angularjs-rails-1.2.14 vs vendor/assets/javascripts/angular-cookies.js in angularjs-rails-1.2.15

- old
+ new

@@ -1,7 +1,7 @@ /** - * @license AngularJS v1.2.14 + * @license AngularJS v1.2.15 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) {'use strict'; @@ -28,12 +28,13 @@ * @name $cookies * * @description * Provides read/write access to browser's cookies. * - * Only a simple Object is exposed and by adding or removing properties to/from - * this object, new cookies are created/deleted at the end of current $eval. + * Only a simple Object is exposed and by adding or removing properties to/from this object, new + * cookies are created/deleted at the end of current $eval. + * The object's properties can only be strings. * * Requires the {@link ngCookies `ngCookies`} module to be installed. * * @example <example> @@ -97,15 +98,13 @@ //update all cookies updated in $cookies for(name in cookies) { value = cookies[name]; if (!angular.isString(value)) { - if (angular.isDefined(lastCookies[name])) { - cookies[name] = lastCookies[name]; - } else { - delete cookies[name]; - } - } else if (value !== lastCookies[name]) { + value = '' + value; + cookies[name] = value; + } + if (value !== lastCookies[name]) { $browser.cookies(name, value); updated = true; } }