Closed hemant17 closed 3 years ago
Well, I would not use such a long condition anyway. Why do not you use a function for it?
can you please explain ? or example how I do that?
I mean you can make a condition like: data-condition="myFunction(variety, order_type, auto_mation)"
and then in some other place (before calling conditionize()
) define your function like:
function myFunction(variety, order_type, auto_mation) {
return (varitey == "CO" && (order_type == "MARKET" || order_type == "LIMIT")) || (varitey == "CO" && (order_type == "SLM" || order_type == "SLL" ) ) || (varitey == "BO" && order_type) || ( (auto_mation == "BOT" || auto_mation == "COT" ) && order_type == "MARKET" ) || ((auto_mation == "BOT" )&& order_type == "LIMIT") || ((auto_mation == "COT" )&& order_type == "LIMIT")
}
$(".my-conditional-element").conditionize();
Uncaught RangeError : Maximum Call Stack size exceeded
when i add much more condition in one place like tis