Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Fix intersection button send again (removed validation inside forEach)
Igor Guastalla de Lima4b4e6ca31a04
diff --git a/pages/index.vue b/pages/index.vueindex e524958ac..36e21f106 100644--- a/pages/index.vue+++ b/pages/index.vue@@ -531,22 +531,15 @@if (this[key]) this[key] = queries[key];}},- observeRequestButton: function () {- let isTheInitialIntersection = true;- const sendButtonElement = this.$refs.sendButton;- const requestElement = this.$refs.request.$el;- const observer = new IntersectionObserver((entries, observer) => {- entries.forEach(entry => {- if (entry.isIntersecting) {- if (!isTheInitialIntersection) {- sendButtonElement.classList.toggle('show');- } else {- isTheInitialIntersection = false;- }- }- });- }, {threshold: 1});- observer.observe(requestElement);+ observeRequestButton() {+ const requestElement = this.$refs.request.$el;+ const observer = new IntersectionObserver((entries, observer) => {+ entries.forEach(entry => {+ this.$refs.sendButton.classList.toggle('show');+ });+ }, { threshold: 1 });++ observer.observe(requestElement);}},created() {