farling42 / fvtt-pdf-pager

PDF Pager for Foundry
MIT License
6 stars 4 forks source link

add check for array in render for MATT trigger #34

Closed bloy closed 1 year ago

bloy commented 1 year ago

Monks Active Tile Triggers has uses an array for anchor in the options for some reason, which causes an exception within PDF pager when triggering the "Show a Journal" action in MATT.

This adds a check for an array so that MATT's trigger will work.

farling42 commented 1 year ago

I would rather not rely on anything inside one of those arrays.

The default handling in Foundry simply tries to use options.anchor as an index/accessor into a TOC array, so that could doesn't try to access any array contents either.

Instead, I will simply check to see if options.anchor is a string before attempting any further processing. If it isn't a string, then the default processing will be performed.

farling42 commented 1 year ago

Ignoring anything that is not a string has been added in 0.28.1