Skip to content

Fixed the NaN Calculation#4

Open
reef-hbloch wants to merge 1 commit into
dekelb:mainfrom
reef-hbloch:fix/NaN_calculation
Open

Fixed the NaN Calculation#4
reef-hbloch wants to merge 1 commit into
dekelb:mainfrom
reef-hbloch:fix/NaN_calculation

Conversation

@reef-hbloch

@reef-hbloch reef-hbloch commented Mar 2, 2023

Copy link
Copy Markdown

Background

About 2-3 weeks ago, the CibusSplitter chrome extension started to malfunction resulting in "NaN" calculations of the amount each participant of the order is owed.

Remediation

After reviewing the code, it seems the issue was with the price extraction from the span, in which the code was looking for a span tag with a class attribute value of __price__
Wolt has published a new version that obscures the class names.

Work Around

If the participant is the host, the last span tag is the price container, if he is not the host, the last one is the remove icon.
therefore, we have to take the one before it.

Should resolve #3

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.

Getting NaNs instead of numbers :(

1 participant