Avoid redundant JS callback in Status formatter

Created on 20 October 2023, 8 months ago
Updated 5 April 2024, 3 months ago

Problem/Motivation

In Fix Field cache for anonymous users using JS callback in Status formatter Fixed , a JS callback was introduced, to circumvent problems with caching.
However, if the page was just created, the JS was also, unnecessarily, called.

Steps to reproduce

As a developer, set a breakpoint on the formatter.
As an anonymous user, display a node with office hours and current/next formatter or with open/closed /open field.
See that the field is formatter twice.

Proposed resolution

Do not call the JS callback if the page was generated less then 10 seconds ago.

🐛 Bug report
Status

Fixed

Version

1.12

Component

Code - formatter

Created by

🇳🇱Netherlands johnv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024