From f621166f13d65545d739cdd7f5cddf089e16aa25 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 27 Jan 2014 14:43:28 -0800 Subject: [PATCH] Ignore undefined device id, for real this time? --- clientapp/models/me.js | 2 +- clientapp/models/state.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clientapp/models/me.js b/clientapp/models/me.js index 7e5f24d..d662de4 100644 --- a/clientapp/models/me.js +++ b/clientapp/models/me.js @@ -199,7 +199,7 @@ module.exports = HumanModel.define({ }, registerDevice: function () { var deviceID = app.state.deviceID; - if (!!deviceID) { + if (!!deviceID && deviceID !== undefined && deviceID !== 'undefined') { client.otalkRegister(deviceID).then(function () { client.registerPush('push@push.otalk.im/prod'); }).catch(function (err) { diff --git a/clientapp/models/state.js b/clientapp/models/state.js index 9fec57a..da38f72 100644 --- a/clientapp/models/state.js +++ b/clientapp/models/state.js @@ -62,7 +62,7 @@ module.exports = HumanModel.define({ deviceIDReady: { deps: ['connected', 'deviceID'], fn: function () { - return (this.connected && this.deviceID); + return (this.connected && !!this.deviceID); } } }, diff --git a/package.json b/package.json index 5a0c5f2..9bf5ba8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "otalk.im", - "version": "0.0.18", + "version": "0.0.19", "description": "Otalk: WebRTC Enabled XMPP Client, in the Browser", "repository": { "type": "git",