ruby_shopify_app 1.3.0 → 1.3.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3df3a9360400540ee0e4b69c7af74a3355384f987e6ba0dc15151157cd874ae0
4
- data.tar.gz: fb269cf6a4f7e6bb5ffd342c4151377bea3b2acdcd760b88964f29344d14e709
3
+ metadata.gz: 4f1c0b9278c1d143d0872ca501b2259cae0998c2cba5d7c6ebac4b58428a81b1
4
+ data.tar.gz: 7f9c04c736700f0e35d65af04949f8f56bcbc56611f2ddd61e796586808e4ab5
5
5
  SHA512:
6
- metadata.gz: 12408e8093f2eeacd8cfa5e704e59066ac2f68d37bfb45b610357219dfff4cccedb5489509432560ab3d778989f41968cc27c7f35da80be1167e0daaee76671f
7
- data.tar.gz: 9bf7d5c873890ce861dee6c26730e3c9d2eac72da2239fd16a82f9604125d51fbdeeb144b69ad09262d1ce4ed3ac180b2b0c4dcc39f55734c212c169bf46c065
6
+ metadata.gz: 3ca8751b1d52328e68c609cba8184ae0ea035b74a0f27ab5c97a15cc01207cce6846ab5ae71db8510165e8651eb4abe16572c76642a5487cec1234276976f0e6
7
+ data.tar.gz: 13f1848f49f793540f6f3b670466be3b7f4d6e728499810e080088514c8244aa25053e24cc459a27be3e937a39da3f3122d371997c4d24fdd451774e813ea46b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.3.1
2
+ -----
3
+
4
+ * Update redirect.js
5
+
1
6
  1.3.0
2
7
  -----
3
8
 
@@ -10,15 +10,12 @@
10
10
 
11
11
  var targetInfo = JSON.parse(redirectTargetElement.dataset.target);
12
12
 
13
- if (window.top == window.self) {
14
- // If the current window is the 'parent', change the URL by setting location.href
15
- window.top.location.href = targetInfo.url;
16
- } else {
17
- // If the current window is the 'child' or embedded, change the parent's URL with
18
- // App Bridge redirect. This case can happen when an app updates its access scopes,
19
- // or the unlikely scenario where the shop thinks the app is installed, but the
20
- // app does not have an record for the shop.
13
+ var appBridgeUtils = window['app-bridge']['utilities'];
14
+
15
+ if (appBridgeUtils.isShopifyEmbedded()) {
21
16
  window.appBridgeRedirect(targetInfo.url);
17
+ } else {
18
+ window.top.location.href = targetInfo.url;
22
19
  }
23
20
  }
24
21
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ShopifyApp
4
- VERSION = "1.3.0"
4
+ VERSION = "1.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hopper Gee