       if state is 'error'
         @container.addClass('uploadcare--preview_status_error-' + data.error)
 
-    initImage: (imgSize, cdnModifiers) ->
+    initImage: (imgSize, cdnModifiers) =>
       img = @container.find('.uploadcare--preview__image')
       done = @container.find('.uploadcare--preview__done')
 

    # unknown
    # image
    # regular
    __setState: (state, data) ->
      @__state = state
      data = data || {}


uploadcare.namespace 'widget.tabs', (ns) ->
  class ns.PreviewTab extends ns.BasePreviewTab

    constructor: (@container, @tabButton, @dialogApi, @settings, @name) ->
      super

      $.each @dialogApi.fileColl.get(), (i, file) =>
