withdraw: replace location.hostname with location.host.

fixes https://github.com/lnbits/lnbits/issues/88
This commit is contained in:
fiatjaf 2020-09-14 15:46:23 -03:00
parent 1e2dd412c7
commit f452b9c00d

View File

@ -1,3 +1,5 @@
/* global Vue, VueQrcode, _, Quasar, LOCALE, windowMixin, LNbits */
Vue.component(VueQrcode.name, VueQrcode) Vue.component(VueQrcode.name, VueQrcode)
var locationPath = [ var locationPath = [
@ -116,7 +118,7 @@ new Vue({
this.qrCodeDialog.data = _.clone(link) this.qrCodeDialog.data = _.clone(link)
console.log(this.qrCodeDialog.data) console.log(this.qrCodeDialog.data)
this.qrCodeDialog.data.url = window.location.hostname this.qrCodeDialog.data.url = window.location.host
this.qrCodeDialog.show = true this.qrCodeDialog.show = true
}, },
openUpdateDialog: function (linkId) { openUpdateDialog: function (linkId) {
@ -181,7 +183,7 @@ new Vue({
) )
.then(function (response) { .then(function (response) {
self.withdrawLinks = _.reject(self.withdrawLinks, function (obj) { self.withdrawLinks = _.reject(self.withdrawLinks, function (obj) {
return obj.id == data.id return obj.id === data.id
}) })
self.withdrawLinks.push(mapWithdrawLink(response.data)) self.withdrawLinks.push(mapWithdrawLink(response.data))
self.formDialog.show = false self.formDialog.show = false
@ -219,7 +221,7 @@ new Vue({
) )
.then(function (response) { .then(function (response) {
self.withdrawLinks = _.reject(self.withdrawLinks, function (obj) { self.withdrawLinks = _.reject(self.withdrawLinks, function (obj) {
return obj.id == linkId return obj.id === linkId
}) })
}) })
.catch(function (error) { .catch(function (error) {