Skip to content
Snippets Groups Projects
Verified Commit 480738f3 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3513443 by tom konda, smustgrave: Loose checking for calling JavaScript theme function

parent 679a1b2b
No related branches found
No related tags found
No related merge requests found
Pipeline #465311 passed with warnings
Pipeline: drupal

#465315

    ......@@ -616,9 +616,13 @@ window.Drupal = { behaviors: {}, locale: {} };
    * but also a complex object.
    */
    Drupal.theme = function (func, ...args) {
    if (func in Drupal.theme) {
    if (typeof Drupal.theme?.[func] === 'function') {
    return Drupal.theme[func](...args);
    }
    Drupal.throwError(
    new TypeError(`Drupal.theme.${func} must be function type.`),
    );
    };
    /**
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment