-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
Description
problems with using isdefined()
I'm trying to use "isdefined()" in a way where I have an if() block to check if the variable is defined, and if the condition returns true, I want to return the value of the variable. But no matter what I do, "isdefined()" either returns false or the complete string: "isdefined(@variable)";
Current behavior:
@a: blue;
@b: if((isdefined(@a)), @a, black);
@b = blackExpected behavior:
@a: blue;
@b: if((isdefined(@a)), @a, black);
@b = bluealso
Current behavior:
@b: isdefined(@a);
@b = false✅ which is correct
@a:red;
@b: isdefined(@a);
@b = isdefined(red);❌ .....should be true
Also, not defining @a will always throw an error "@A is undefined"
The funny thing is this works perfectly fine when trying to use this on the less playground.
Environment information:
I tested this in VS code using the CDN links to compile LESS
lessversion: 4.4.2operating system: windows
dosubot