Verified Commit 0a0cb1b4 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3291587 by joseph.olstad, lauriii, longwave: Regression fix for (if...

Issue #3291587 by joseph.olstad, lauriii, longwave: Regression fix for (if feasible) uses of the jQuery trim function to use vanillaJS

(cherry picked from commit 491c9b41)
parent 4a63b1c7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -31,7 +31,14 @@
   */
  $.fn.drupalGetSummary = function () {
    const callback = this.data('summaryCallback');
    return this[0] && callback ? callback(this[0]).trim() : '';

    if (!this[0] || !callback) {
      return '';
    }

    const result = callback(this[0]);

    return result ? result.trim() : '';
  };

  /**