mirror of
https://github.com/nolanlawson/pinafore
synced 2025-02-07 15:08:52 +01:00
fix: fix undefined error in media dialog scroll (#1048)
This commit is contained in:
parent
b7299f53fb
commit
b0aa86ef44
@ -266,7 +266,11 @@
|
||||
},
|
||||
onScroll () {
|
||||
let { length } = this.get()
|
||||
let { scrollWidth, scrollLeft } = this.refs.scroller
|
||||
let { scroller } = this.refs
|
||||
if (!scroller) {
|
||||
return
|
||||
}
|
||||
let { scrollWidth, scrollLeft } = scroller
|
||||
let scrolledItem = Math.round((scrollLeft / scrollWidth) * length)
|
||||
this.set({ scrolledItem })
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user