Commit 70e593b3 authored by Mahdi Mahmoudy's avatar Mahdi Mahmoudy
Browse files

fixes GOA-3532

parent a15a31be
......@@ -8,21 +8,6 @@ basketModule.factory('basketService', function($cookies, termService, $q) {
basketList.getCookies = function() {
var cookieValue = $cookies.get(cookieName) || [];
// NOTE: remove the following try-catch block after a few days
// of production. This is only to deal with older cookie values.
// If cookie value is a JSON object, convert it to the newer string format.
try {
cookieValue = JSON.parse(cookieValue);
cookieValue = Object.keys(cookieValue)
.map(function(k) { return k.substring(3) })
.join(',');
$cookies.put(cookieName, cookieValue);
} catch(e) {
// do nothing...
}
return (cookieValue.length > 0)
? cookieValue
.split(',')
......@@ -36,7 +21,6 @@ basketModule.factory('basketService', function($cookies, termService, $q) {
if (items instanceof Array) {
cookieValue = items.join(',');
}
$cookies.put(cookieName, cookieValue);
}
......
......@@ -95,7 +95,6 @@ wsService.factory('termService', [
'$http',
'ENV',
function ($http, ENV) {
//var
return {
getGOTerms: function (ids) {
return $http.get(ENV.apiEndpoint + '/ontology/go/terms/' + ids);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment