File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ const toNodeArray = (nodes) => {
5353
5454
5555function ensure_array ( obj ) {
56+ if ( typeof obj === "undefined" ) {
57+ return [ ]
58+ }
5659 const is_array = typeof obj [ Symbol . iterator ] === 'function' && typeof obj !== 'string' ;
5760 if ( is_array ) {
5861 return [ ...obj ] ;
Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ const inject = {
557557 // 2) getting the element to scroll to (if not "top")
558558 const scroll_target = [ "top" , "target" ] . includes ( cfg . scroll )
559559 ? cfg . $target [ 0 ]
560- : dom . querySelectorAllAndMe ( $injected [ 0 ] , cfg . scroll ) ;
560+ : dom . querySelectorAllAndMe ( $injected , cfg . scroll ) [ 0 ] ;
561561
562562 const scroll_container = dom . find_scroll_container (
563563 scroll_target ,
You can’t perform that action at this time.
0 commit comments