We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62bbf98 commit 1c6ca61Copy full SHA for 1c6ca61
1 file changed
lib/otr.js
@@ -596,7 +596,7 @@
596
if (msg) {
597
this.io(msg, meta)
598
599
- if (Promise && typeof Promise.resolve === 'function')
+ if (typeof Promise !== 'undefined' && typeof Promise.resolve === 'function')
600
return Promise.resolve(msg)
601
}
602
@@ -658,7 +658,7 @@
658
if (msg.msg) {
659
this.trigger('ui', [msg.msg, !!msg.encrypted, meta])
660
661
662
return Promise.resolve([msg.msg, !!msg.encrypted])
663
664
0 commit comments