From 08b309d09c5d4ed8033bfc2bdd379307e7e99659 Mon Sep 17 00:00:00 2001 From: Mehmet Celik Date: Mon, 22 May 2017 09:44:08 +0200 Subject: [PATCH] unhandle promise --- js/custom.js | 5 ++++- js/primo.js | 2 +- js/primo/explore/helper.js | 3 +++ package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/custom.js b/js/custom.js index 8141797..b2c6169 100644 --- a/js/custom.js +++ b/js/custom.js @@ -90,7 +90,7 @@ var Primo = function () { * @return {string} */ get: function get() { - return "0.0.7"; + return "0.0.8"; } }, { key: 'explore', @@ -462,6 +462,9 @@ var Helper = function () { if (data.status == 'ok') { var fines = data.data.fines; resolve(fines.fine); + } else { + console.log('No fines'); + resolve([]); } } catch (error) { resolve([]); diff --git a/js/primo.js b/js/primo.js index 8cfdbfb..ee7952a 100644 --- a/js/primo.js +++ b/js/primo.js @@ -14,7 +14,7 @@ export default class Primo { * @return {string} */ static get version() { - return "0.0.7"; + return "0.0.8"; } /** diff --git a/js/primo/explore/helper.js b/js/primo/explore/helper.js index 56a650e..768f8f5 100644 --- a/js/primo/explore/helper.js +++ b/js/primo/explore/helper.js @@ -107,6 +107,9 @@ export default class Helper { if (data.status == 'ok') { let fines = data.data.fines; resolve(fines.fine); + } else { + console.log('No fines'); + resolve([]); } } catch(error){ diff --git a/package.json b/package.json index a45bc15..f177dcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "primo-explore-dom", - "version": "0.0.7", + "version": "0.0.8", "description": "A simple Domain Object Model for Primo 5", "main": "js/custom.js", "scripts": {