Merge branch 'hotfix/release57' into 'master'
cookie-foreach-problem See merge request !601
Showing
2 changed files
with
2 additions
and
2 deletions
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | name = '_UID', | 22 | name = '_UID', |
23 | cookies = (document.cookie && document.cookie.split(';')) || []; | 23 | cookies = (document.cookie && document.cookie.split(';')) || []; |
24 | 24 | ||
25 | - cookies.forEach(function(c) { | 25 | + cookies instanceof Array && cookies.forEach(function(c) { |
26 | if (c.indexOf(name) > -1) { | 26 | if (c.indexOf(name) > -1) { |
27 | uid = decodeURIComponent(c.replace(name + '=', '').trim()); | 27 | uid = decodeURIComponent(c.replace(name + '=', '').trim()); |
28 | return; | 28 | return; |
@@ -28,7 +28,7 @@ function cookie(name) { | @@ -28,7 +28,7 @@ function cookie(name) { | ||
28 | 28 | ||
29 | if (cookies) { | 29 | if (cookies) { |
30 | cookies = cookies.split(';'); | 30 | cookies = cookies.split(';'); |
31 | - cookies.forEach(function(c) { | 31 | + cookies instanceof Array && cookies.forEach(function(c) { |
32 | if (c.indexOf(name) > -1) { | 32 | if (c.indexOf(name) > -1) { |
33 | cookieVal = decodeURIComponent($.trim(c.replace(name + '=', ''))); | 33 | cookieVal = decodeURIComponent($.trim(c.replace(name + '=', ''))); |
34 | return; | 34 | return; |
-
Please register or login to post a comment