You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mbrandonw I was looking for that the whole day since read your article, but didn't realise that one could use selector for that. I'm not sure it would work though with custom property accessors and instance variables, didn't do ObjC for a while, but that should be rare anyway. Thanks for the tip, I'll make a PR. I suppose we will just return nil for now, but can consider better options later in general.
["item":["name":"John"],"key":"name"]"The result of {{ item[key] }} will be the same as {{ item.name }}. It will first evaluate the result of {{ key }}, and only then evaluate the lookup expression."
Hi! I noticed that if you reference a field for a variable that doesn't exist, you get a crash with SIGABRT. For example this template render:
will crash.
To fix I believe all you have to do is guard this
value(forKey:)
call:Stencil/Sources/Variable.swift
Line 107 in 00e71c1
with this:
Does the current code work as expected, or is it worth fixing?
Thanks!
The text was updated successfully, but these errors were encountered: