stavroskasidis / BlazorContextMenu

A context menu component for Blazor !

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when className is not of type string

SebastianWachsmuth opened this issue · comments

For some DOM-Elements className is not of type string (svg for example)

In those cases .split() will throw. same error as #110

could maybe be fixed by using element.classList. it has a contains method

Ok thank you for reporting this. I will work on it and provide a patch.

the simplest way, with the fewest changes is to replace line 41 and 63 with
var classes = el.classList != undefined ? el.classList : [];

Changed in 1.13