This is a (Firefox) add-on (WebExtension) that lets you invert the website's color scheme by inverting/changing the prefers-color-scheme media feature of CSS.
The add-on throws an exception: TypeError: mediaQueryString.includes is not a function
in getColorTypeFromMediaQuery, because it expects a string there.
Expected behavior
ignore invalid parameters and pass it to the original function
System
Operating system and version: Fedora 30
Browser and version: Firefox 68
Add-on version: latest
Bug description
If an invalid type is passed, we can directly ignore it and forward it to the real query.
Steps to reproduce
Actual behavior
The add-on throws an exception:
TypeError: mediaQueryString.includes is not a function
in getColorTypeFromMediaQuery, because it expects a string there.Expected behavior
ignore invalid parameters and pass it to the original function
System
Operating system and version: Fedora 30 Browser and version: Firefox 68 Add-on version: latest
Possible solution
check parameter type