mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-26 18:51:50 +02:00
reset the 'failedLoad' state when a new entity is selected
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
App.controller "BinaryFileController", ["$scope", ($scope) ->
|
||||
App.controller "BinaryFileController", ["$scope", "$rootScope", ($scope, $rootScope) ->
|
||||
|
||||
$scope.failedLoad = false
|
||||
$rootScope.$on 'entity:selected', () ->
|
||||
$scope.failedLoad = false
|
||||
|
||||
window.sl_binaryFilePreviewError = () =>
|
||||
$scope.failedLoad = true
|
||||
|
||||
Reference in New Issue
Block a user