Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
chore: gracefully handle missing ElementTemplates#createElement
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Mar 28, 2022
1 parent cc1492f commit 0b68fd1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/append-menu/AppendMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ AppendMenu.prototype._getMatchingTemplates = function() {

AppendMenu.prototype._getTemplateEntries = function(element) {

if (!('createElement' in this._elementTemplates)) {
return [];
}

const templates = this._getMatchingTemplates();

return templates.map(template => {
Expand Down

0 comments on commit 0b68fd1

Please sign in to comment.