From 54689332bcb7dda30dbf1c0f6adf796324b54a78 Mon Sep 17 00:00:00 2001 From: Voltace Date: Thu, 16 Apr 2015 18:55:30 +0200 Subject: [PATCH] version bump to v1.0.4 --- bower.json | 2 +- dist/browser-cookies.test.js | 6 ++++-- package.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 1fbb556..5fca98e 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "browser-cookies", "main": "browser-cookies.js", - "version": "1.0.3", + "version": "1.0.4", "homepage": "https://github.com/voltace/browser-cookies", "authors": [ "Voltace " diff --git a/dist/browser-cookies.test.js b/dist/browser-cookies.test.js index fcacdbc..2e03be8 100644 --- a/dist/browser-cookies.test.js +++ b/dist/browser-cookies.test.js @@ -41,9 +41,11 @@ exports.get = function(name) { // Determine separator index ("name=value") var separatorIndex = cookie.indexOf('='); + + // IE<11 emits the equal sign when the cookie value is empty separatorIndex = separatorIndex < 0 ? cookie.length : separatorIndex; - // If a separator index is found, Decode the cookie name and compare to the requested cookie name + // Decode the cookie name and remove any leading/trailing spaces, then compare to the requested cookie name if (decodeURIComponent(cookie.substring(0, separatorIndex).replace(/^\s+|\s+$/g,'')) == name) { return decodeURIComponent(cookie.substring(separatorIndex + 1, cookie.length)); } @@ -61,4 +63,4 @@ exports.erase = function(name, options) { httponly: false} ); }; - } \ No newline at end of file + } diff --git a/package.json b/package.json index 0835f4a..ccbf542 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "browser-cookies", "description": "Tiny cookies library for the browser", - "version": "1.0.3", + "version": "1.0.4", "main": "browser-cookies.js", "files": [ "browser-cookies.js",