fixes for inconsistent cart state

This commit is contained in:
Edin Dazdarevic
2015-05-27 11:57:55 +02:00
parent d5cef64cb6
commit d358934a01
3 changed files with 17 additions and 25 deletions

View File

@@ -34,7 +34,9 @@ var getItemIdFromUrl = function() {
var itemIdRegex = /artikal\/(\d+)\//g;
var match = itemIdRegex.exec(url);
return match[1];
if (match) {
return match[1];
}
};
var fetchItemWithDetails = function() {
@@ -191,4 +193,4 @@ AppDispatcher.register(function(payload) {
});
module.exports = ItemStore;
module.exports = ItemStore;