Selaa lähdekoodia

fix: open() ignore url startsWith `proginn://`

Acathur 4 vuotta sitten
vanhempi
commit
e79374306e
3 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 1 1
      dist/bridge/index.js
  2. 1 1
      package.json
  3. 1 1
      src/bridge/index.ts

+ 1 - 1
dist/bridge/index.js

@@ -153,7 +153,7 @@ class ProginnBridge {
         window.location.href = url;
     }
     open(url, title) {
-        if (this.isInApp && (!this.isAndroid || this.compareAppVersion('gte', '4.20.0'))) {
+        if (this.isInApp && !url.startsWith('proginn://') && (!this.isAndroid || this.compareAppVersion('gte', '4.20.0'))) {
             url = `proginn://webview?url=${encodeURIComponent(url)}${title ? '&title=' + encodeURIComponent(title) : ''}`;
         }
         this.load(url);

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "proginn-lib",
-  "version": "0.5.2",
+  "version": "0.5.3",
   "description": "Proginn front-end common library.",
   "main": "dist/index.js",
   "module": "dist/index.js",

+ 1 - 1
src/bridge/index.ts

@@ -187,7 +187,7 @@ class ProginnBridge {
   }
 
   open(url: string, title?: string) {
-    if (this.isInApp && (!this.isAndroid || this.compareAppVersion('gte', '4.20.0'))) {
+    if (this.isInApp && !url.startsWith('proginn://') && (!this.isAndroid || this.compareAppVersion('gte', '4.20.0'))) {
       url = `proginn://webview?url=${encodeURIComponent(url)}${title ? '&title=' + encodeURIComponent(title) : ''}`
     }