Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 45f3285

Browse files
author
samsep
committed
add validity check on image for image viewer init
1 parent b4c5856 commit 45f3285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/directives/image-viewer.directive.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ directive = ($window)->
1111

1212
scope.$apply "vm.largeImage = #{ wide || tall }"
1313

14-
image.onload = ->
14+
image?.onload = ->
1515
checkOverflow()
1616

1717
$($window).bind 'resize', ->

0 commit comments

Comments
 (0)