Skip to content

Commit

Permalink
fix not saving the current url context when changing the language
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Aug 5, 2024
1 parent 5c3c9ea commit cb3b7ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/javascript/controllers/turbo_frame_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default class extends Controller {
this.frame.innerHTML = this.placeHolderValue
} else {
this.frame.innerHTML = ""
this.urlValue = new HistoryService().getUpdatedURL(this.urlValue, data)

let currentUrl = document.location.pathname + document.location.search
this.urlValue = new HistoryService().getUpdatedURL(currentUrl, data)
this.frame.src = this.urlValue
}
}
Expand Down

0 comments on commit cb3b7ba

Please sign in to comment.