Skip to content

Commit 0908967

Browse files
committed
fix report not rendering in browser - fixes #10
1 parent 5a24793 commit 0908967

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

CHANGELOG.md

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

3+
## v0.0.18
4+
- fix: exported metrics report does not render in browser - #10
5+
36
## v0.0.17
47
- update: solidity-metrics ([Changelog](https://github.com/ConsenSys/solidity-metrics/releases/tag/v0.0.16))
58
- new metric: External Dependencies

content/main.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "solidity-metrics",
33
"displayName": "Solidity Metrics",
44
"description": "Solidity Metrics",
5-
"version": "0.0.17",
5+
"version": "0.0.18",
66
"keywords": [
77
"code",
88
"metrics",

websrc/main.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const vscode = acquireVsCodeApi();
21

32
function getRisks(inputJson){
43
console.log(inputJson);
@@ -328,7 +327,11 @@ window.addEventListener('message', event => {
328327
}, false);
329328

330329
window.onload = function() {
331-
vscode.postMessage({
332-
command: "onPageLoaded",
333-
});
334-
}
330+
if (typeof acquireVsCodeApi === "function") {
331+
const vscode = acquireVsCodeApi();
332+
333+
vscode.postMessage({
334+
command: "onPageLoaded",
335+
});
336+
}
337+
};

0 commit comments

Comments
 (0)