© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Marco Alka
Software Engineer, Technical Consultant & Mentor
"Better" as in what? Something you might do is
const filters = window.containers.filters; if (filters && filters.params) { xhrData.filters = filters.params; }
But imho, that's just personal taste...
Nirmalya Ghosh
Developer
The code which I wrote in the question seems hacky to me since if I had to check for 2 variable like that, it would become a mess. The code which you wrote is much better!