Skip to content
Snippets Groups Projects
Verified Commit 491c9b41 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
parent ab12a9be
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,14 @@ ...@@ -31,7 +31,14 @@
*/ */
$.fn.drupalGetSummary = function () { $.fn.drupalGetSummary = function () {
const callback = this.data('summaryCallback'); 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() : '';
}; };
/** /**
......
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