- Issue created by @loze
- @loze opened merge request.
- Status changed to Needs review
about 1 year ago 7:31am 15 October 2023
The javascript is triggered multiple times per page load, which in turn makes an ajax call to /timezone-detect/ajax/set-timezone
The problem is drupalBehaviors is executed multiple times on the page, before /timezone-detect/ajax/set-timezone has a chance to finish.
The ajax request should only happen, at max, once per page load.
Either use once() or $( document ).ready() when making the ajax call, to ensure it only happens once per page load.
Needs review
1.0
Code