Inverted browser.getBrowser if statement

I use a glsl Canvas with a custom shader. It all works well, only firefox has some serious performance issues. Since its a known bug and there is no workaround i know of, i want to exclude specific scripts only for firefox. So i tried to invert the browser.getBrowser Twig thingy, but …

        {% if not browser.getBrowser == 'firefox' %}
            {% do assets.addJs('theme://js/GlslCanvas.js', 99) %}
            {% do assets.addJs('theme://js/canvas.js',  {group: 'bottom'}) %}
        {% endif %}

… does not work. I tried several other iterations of the not statement, but i never get it to work. Since its my first time using grav and twig, i just think i am missing something obvious. can you guys help me out?


Should that conditional be {% if browser.getBrowser != 'firefox' %}?

strange, i thought i tried that… but it seems to work now, so thank you very much!

Its a bit of the Twig-syntax that often gets overlooked, because if not this equals 'this' seems logically valid - if not altogether well-structured - but it’s not. if browser.getBrowser not 'firefox' would work as well, but it’s often nice to include the “stricter” comparison operator if you need to do type-checking at the same time.