Skip to content

Commit

Permalink
fix: prevent crash on list on spotlight on android
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Mar 2, 2017
1 parent d980c1b commit 6419361
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion www/branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,13 @@ Branch.prototype.createBranchUniversalObject = function (options) {
* List item on Spotlight (iOS Only).
*/
obj.listOnSpotlight = function () {
return execute('listOnSpotlight', [obj.instanceId])
if (deviceVendor.indexOf('Apple') < 0) {
return execute('listOnSpotlight', [obj.instanceId])
} else {
return new Promise(function (resolve, reject) {
reject('iOS Spotlight only')
})
}
}

resolve(obj)
Expand Down

0 comments on commit 6419361

Please sign in to comment.