1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Catch an error if this is not defined.

This commit is contained in:
Kevin Serrano 2017-10-05 17:13:58 -07:00
parent b9012a62e5
commit 106af9ec5b
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -18,7 +18,14 @@ class ExtensionPlatform {
} }
getPlatformInfo (cb) { getPlatformInfo (cb) {
return extension.runtime.getPlatformInfo(cb) var info
try {
info = extension.runtime.getPlatformInfo(cb)
} catch (e) {
log.debug(e)
info = undefined
}
return info
} }
} }