app/assets/javascripts/formstrap/controllers/media_controller.js in formstrap-0.1.0 vs app/assets/javascripts/formstrap/controllers/media_controller.js in formstrap-0.1.1
- old
+ new
@@ -29,10 +29,11 @@
syncIds () {
const ids = this.activeIds()
this.modalButtonTargets.forEach((button) => {
- const url = new URL(button.getAttribute('href'))
+ const sourceLocation = location.protocol + '//' + location.host
+ const url = new URL(button.getAttribute('href'), sourceLocation)
// Remove all ids[]
url.searchParams.delete('ids[]')
// Add new ids