Skip to content

Commit

Permalink
Null out data after serializing to JSON to send to Kotlin JS. Fixes #18
Browse files Browse the repository at this point in the history
  • Loading branch information
handstandsam committed Jul 3, 2024
1 parent af6e937 commit dd2bfa7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions invert-gradle-plugin/src/main/resources/META-INF/invert.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ window.externalLoadJavaScriptFile = function (key, callback) {
let src = invertKeyToUrl(key)
loadJsFileAsync(src, function () {
let json = JSON.stringify(window.invert_report[key])
// null out global variable since it has been serialized to json
window.invert_report[key] = null
callback(json)
})
}


// https://github.com/vasturiano/force-graph
// https://unpkg.com/force-graph
window.render3dGraph = function (domElementId, graphDataJson, width, height) {
Expand Down Expand Up @@ -102,11 +103,11 @@ window.markdownToHtml = function (markdownStr) {
return marked.parse(markdownStr)
}

window.callDecodeURIComponent = function(str){
window.callDecodeURIComponent = function (str) {
return decodeURIComponent(escape(str))
}

window.highlightJsHighlightAll = function() {
window.highlightJsHighlightAll = function () {
console.log("hljs.highlightAll()")
hljs.highlightAll();
}

0 comments on commit dd2bfa7

Please sign in to comment.