Skip to content

Commit

Permalink
Resolve Policial errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Francine Navarro committed Aug 23, 2018
1 parent 83eed27 commit 58e7c56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/shopify_app/controller_concerns/login_protection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ def login_url(top_level: false)

query_params = {}
query_params[:shop] = sanitized_params[:shop] if params[:shop].present?
query_params[:shop] ||= referer_sanitized_shop_name if referer_sanitized_shop_name.present?

if referer_sanitized_shop_name.present?
query_params[:shop] ||= referer_sanitized_shop_name
end

query_params[:top_level] = true if top_level

url = "#{url}?#{query_params.to_query}" if query_params.present?
Expand Down
3 changes: 2 additions & 1 deletion lib/shopify_app/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ class Engine < Rails::Engine
isolate_namespace ShopifyApp

initializer "shopify_app.assets.precompile" do |app|
app.config.assets.precompile += %w( shopify_app/redirect.js shopify_app/itp_polyfill.js )
app.config.assets.precompile += %w[ shopify_app/redirect.js
shopify_app/itp_polyfill.js ]
end
end
end

0 comments on commit 58e7c56

Please sign in to comment.