Skip to content

Completion calculations can return NaN when page content is optional #259

@chris-steele

Description

@chris-steele

Subject of the issue/enhancement/features

If a page contains only optional content then calculatePercentageComplete will return NaN because it performs division by zero. This results in the PLP indicator appearing to show 100% completion due to the resulting style --adapt-pagelevelprogress-percentage: NaN%;

Your environment

  • latest framework (vanilla theme)

Steps to reproduce

Use "_isOptional":true on all contents of the page (components, blocks and articles).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions