@viibe/impulse-integration-js 2.2.3 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viibe/impulse-integration-js",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "description": "ViiBE integration in js native",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/src/index.js CHANGED
@@ -135,11 +135,16 @@ class Viibe {
135
135
  return new Promise((resolve, reject) => {
136
136
  const win = window.open(src, 'Authorization', windowParams.join(', '))
137
137
 
138
+ if(!win) {
139
+ reject('Failed to open window')
140
+ }
141
+
138
142
  const closeCheck = setInterval(() => {
139
143
  if(win.closed) {
140
144
  destroy();
141
145
  onClose();
142
146
  }
147
+
143
148
  }, 100)
144
149
 
145
150
  const onClose = () => {