Skip to content

Commit 6a40351

Browse files
authored
Merge pull request #39 from Shopify/fix-profiling-path
fix profiling path
2 parents 74199b8 + 1e49895 commit 6a40351

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## v1.0.2 (Jan 27, 2019)
4+
5+
* [#39](https://github.com/Shopify/shopify-theme-inspector/pull/39) Fix profiling path
6+
37
## v1.0.1 (Jan 27, 2019)
48

59
* [#37](https://github.com/Shopify/shopify-theme-inspector/pull/37) Fix custom domain redirect

src/devtools.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ chrome.devtools.inspectedWindow.eval(
3939

4040
function getInspectedWindowURL(): Promise<URL> {
4141
return new Promise(resolve => {
42-
chrome.devtools.inspectedWindow.eval('Shopify.shop', function(
43-
currentUrl: string,
44-
) {
45-
resolve(new URL(`https://${currentUrl}`));
46-
});
42+
chrome.devtools.inspectedWindow.eval(
43+
'Shopify.shop + document.location.pathname',
44+
function(currentUrl: string) {
45+
resolve(new URL(`https://${currentUrl}`));
46+
},
47+
);
4748
});
4849
}
4950

src/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Shopify Theme Inspector for Chrome",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Profile and debug Liquid template on your Shopify store",
55
"devtools_page": "devtools.html",
66
"permissions": ["storage", "identity", "activeTab"],

test/test-helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function setDevtoolsEval(page: any) {
2424
window.chrome.devtools.inspectedWindow.eval = function(value, cb){
2525
if (value === "typeof window.Shopify === 'object'") {
2626
return cb(true)
27-
} else if (value === "Shopify.shop") {
27+
} else if (value === "Shopify.shop + document.location.pathname") {
2828
return cb('shop1.myshopify.io')
2929
}
3030
};

0 commit comments

Comments
 (0)