Closed dgwaldo closed 6 months ago
thanks for the catch and the fix!
However, not sure how, but would be nice to be able to do something like this without the try catch...
I agree, there are better ways to do this especially looking back at it, but at the moment bug fixing is the priority so i merged it and released version 2.0.6 with the fix, it should be available soon in Nuget
This commit introduced a bug. Getting the variable source on the same line that the cast to (int) is on only works if the variable source returns an index value. I believe it just needs null guarded to work correctly.
After debugging our project locally to see what was going on, I have this relatively simple fix.
At first I was confused as to why the try catch, but then I realized that the variable source may not have ThrowIfNotFound set to True. In that case the try catch is very important. However, not sure how, but would be nice to be able to do something like this without the try catch...
In any case, it is a simple fix.