custom.js dependencies are not set in commerce_user_points.libraries.yml

Created on 13 July 2023, over 1 year ago
Updated 5 July 2024, 6 months ago

Problem/Motivation

custom.js begins with these:

(function ($, Drupal, drupalSettings) {

And also (now deprecated) jQuery once library is used (which is removed in Drupal 10, but this is another issue):

var myradar = $(context).find('body').once('commerce_user_point');

That means it should be stated that it needs these dependencies in the commerce_user_points.libraries.yml:
- core/jquery
- core/drupal
- core/drupalSettings
- core/jquery.once

These are commonly used libraries by other Drupal modules and themes, so right now this problem does not show because other modules may use this and already load that. But if you test it in isolation, these are missing.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

9.0

Component

Code

Created by

🇸🇰Slovakia kaszarobert

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

Comments & Activities

Production build 0.71.5 2024