Skip to content

Normalize is-tiled-image attribute string to boolean.#325

Open
markpbaggett wants to merge 1 commit intosamvera-labs:mainfrom
markpbaggett:vanilla-tiling
Open

Normalize is-tiled-image attribute string to boolean.#325
markpbaggett wants to merge 1 commit intosamvera-labs:mainfrom
markpbaggett:vanilla-tiling

Conversation

@markpbaggett
Copy link
Member

HTML attributes are always strings, so "false" is always is evaluated as "true" when using image in Vanilla JS.

As the code is currently, this causes the web component (clover-image) to always fetch info.json in tiled image mode. To stop this, this change explicitly compares against true/"true" to correctly handle boolean-like attribute values in Vanilla JS.

HTML attributes are always strings, so "false" is
always being treated as "truthy." This causes the web
component to always fetch info.json in tiled image mode.
Instead, this change explicitly compares against true/"true"
to correctly handle all attribute values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant