django-sortedm2m icon indicating copy to clipboard operation
django-sortedm2m copied to clipboard

[Widget.js] Exception when empty list

Open cuongitbk opened this issue 4 years ago • 0 comments

When the queryset is empty, the widget.js does not handle and the exception occurred:

widget.js:27 Uncaught TypeError: Cannot read property 'match' of undefined
    at prepareUl (widget.js:27)
    at HTMLUListElement.<anonymous> (widget.js:53)
    at Function.each (jquery.js:365)
    at jQuery.fn.init.each (jquery.js:137)
    at iterateUl (widget.js:50)
    at HTMLDocument.<anonymous> (widget.js:60)
    at fire (jquery.js:3187)
    at Object.fireWith [as resolveWith] (jquery.js:3317)
    at Function.ready (jquery.js:3536)
    at HTMLDocument.completed (jquery.js:3552)

cuongitbk avatar Mar 06 '20 03:03 cuongitbk