Don't register events on nonexistent thumbnail.
This commit is contained in:
parent
54722f38d8
commit
1754dd8fb6
@ -11,7 +11,7 @@ ImageHover =
|
||||
cb: @catalogNode
|
||||
|
||||
node: ->
|
||||
return unless @file and (@file.isImage or @file.isVideo)
|
||||
return unless @file and (@file.isImage or @file.isVideo) and @file.thumb
|
||||
$.on @file.thumb, 'mouseover', ImageHover.mouseover @
|
||||
|
||||
catalogNode: ->
|
||||
|
||||
@ -61,7 +61,7 @@ Volume =
|
||||
|
||||
node: ->
|
||||
return unless !BoardConfig.noAudio(@board.ID) and @file?.isVideo
|
||||
$.on @file.thumb, 'wheel', Volume.wheel.bind(Header.hover)
|
||||
$.on @file.thumb, 'wheel', Volume.wheel.bind(Header.hover) if @file.thumb
|
||||
$.on ($('.file-info', @file.text) or @file.link), 'wheel', Volume.wheel.bind(@file.thumbLink)
|
||||
|
||||
catalogNode: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user