Skip to content

Commit 8ef845f

Browse files
committed
Merge pull request #195 from lewisl9029/bugfix-user-creation-notification-error
Fixed user creation notifications error
2 parents 61a5a69 + dd67783 commit 8ef845f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/services/devices/devices-service.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export default function devices(state, session, cryptography, R, $q, $log,
2-
$interval, $timeout, $ionicPopup) {
2+
$interval, $timeout, $ionicPopup, notification) {
33
let updateKillFlags = function updateKillFlags() {
44
let localDeviceId = state.local.devices.get(['deviceInfo', 'id']);
55

6-
let cloudDevices = state.cloud.devices.get();
6+
let cloudDevices = state.cloud.devices.get() || {};
77
cloudDevices[localDeviceId] = {};
88

99
let killFlagsUpdated = R.map((deviceId) => {
@@ -77,7 +77,7 @@ export default function devices(state, session, cryptography, R, $q, $log,
7777
return deviceReady
7878
.then(updateKillFlags)
7979
.then(() => listenForKillFlags())
80-
.catch((error) => notifications.error(error, 'Devices Init Error'));
80+
.catch((error) => notification.error(error, 'Devices Init Error'));
8181
};
8282

8383
return {

0 commit comments

Comments
 (0)