Skip to content

Commit

Permalink
Merge pull request #44 from Roll20/feature/CSC-2698
Browse files Browse the repository at this point in the history
CSC-2698: Add new return value and error message callout for null value
  • Loading branch information
Alicekb authored Jul 17, 2024
2 parents 936e2e2 + f8f5729 commit 388806c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions content/docs/components/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ initRelay({
attribute: string,
characterId: string,
character: Character
}) => {}: any,
}) => {}: string | number | null,
}): Promise<Dispatch>
```

Expand All @@ -46,7 +46,11 @@ This method is defined during the initial SDK initialization process and is invo
Advanced sheet actions typically will first search through the defined computed properties before resorting to the `convertLegacyMacroAttributes` method as a fallback.
{{< /callout >}}

The method's purpose is to return a value that will be substituted in the macro. However, it grants us the autonomy to devise the preferred approach for handling older Custom Sheet attribute values.
The method's purpose is to return a value that will be substituted in the macro. However, it grants us the autonomy to devise the preferred approach for handling older Custom Sheet attribute values.

{{< callout context="danger" >}}
Returning a `null` value will display the following error message to the user: `Unable to find attribute with the name ${attribute}`
{{< /callout >}}

## handleLegacyRollTemplates

Expand Down

0 comments on commit 388806c

Please sign in to comment.