Jellycuts/Jellycuts-Issues

Get Value from Dictionary (valueFor) does not compile properly when magic variable is the same as the key

Closed this issue · 1 comments

Describe the bug

When using valueFor and assigning the result to a magic variable which is the same name as the key, it doesn't compile correctly.

To Reproduce

Take this code and compile

import Shortcuts 1092.6
#Color: red, #Icon: shortcuts
dictionary({"key1": "value1", "key2":"value2"}) >> prefs
valueFor(key: "key1", dictionary: prefs ) >> key1

Expected behavior

A shortcut with 2 actions, Dictionary and Get Value from Dictionary getting the value for key1

Screenshots

valueFor-Issue

Information

  • Device: iPhone X
  • OS: IOS 15
  • Jellycuts Version: 1.2(1)
  • Jailbroken? No

Additional context

This has been fixed in version 1.2.1. Thank you for reporting it!