From 38fc7da2a9cff329c3b4975d9f01c16c10b572e9 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 26 Dec 2016 18:25:58 -0800 Subject: [feature] add support for authenticated API to bitmask.js --- ui/app/models/account.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/app/models/account.js') diff --git a/ui/app/models/account.js b/ui/app/models/account.js index e93d7572..0251da03 100644 --- a/ui/app/models/account.js +++ b/ui/app/models/account.js @@ -112,6 +112,9 @@ export default class Account { // returns a promise, fullfill is passed account object // static active() { + if (!bitmask.api_token()) { + return new Promise((resolve, reject) => {resolve(null)}) + } return bitmask.bonafide.user.active().then( response => { if (response.user == '') { -- cgit v1.2.3