diff --git a/pages/index.vue b/pages/index.vue index 1ac690e4d..acfa56ac5 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -408,12 +408,20 @@ if (status && this.rawParams === '') this.rawParams = '{}' else this.setRouteQueryState() }, - 'response.body': async function (val, oldVal) { - var responseText = document.querySelector("div#response-details-wrapper pre code"); - if (responseText && this.response.body != "(waiting to send request)" && this.response.body != "Loading..." && this.response.body != "See JavaScript console (F12) for details.") { - await setTimeout('', 1000) + 'response.body': function (val) { + var responseText = document.querySelector("div#response-details-wrapper pre code") != null ? document.querySelector("div#response-details-wrapper pre code") : null; + if (responseText) { + if (document.querySelector('.hljs') !== null && responseText.innerHTML.indexOf('