Closed brablc closed 6 months ago
Great catch, will try this out and merge your PR or resolve this soon.
Thanks @brablc.
Resolved in 1.1.8, ended up simplifying the internal isSelector()
function: https://github.com/gnat/surreal/commit/faa3b6ced3ad9a48d7f7c02bf9a630ab6d86c3b4
Your code should now work fine with the update.
@brablc Added a tip about this: https://github.com/gnat/surreal/blob/main/README.md#-conventions--tips
While we are at it, I believe this does not work as shown in documentation.
any('button', start='header').classAdd('red')
Proper code would be:
any('button', me('header')).classAdd('red')
Or if you prefer to assign to variable which would not be used:
any('button', start=me('header')).classAdd('red')
But I do not like that, it may mislead someone that named parameters are already supported (been there ;-).
Perfect @brablc ! Thanks for the corrections. For sure an oversight.
Before
After
it may mislead someone that named parameters are already supported
lmao, I know right?
I have this code:
The third parameter should supress warning in console when the class is not set. But the warning is generated to console: