microsoft / TypeScript-Sublime-Plugin

IO wrapper around TypeScript language services, allowing for easy consumption by editor plugins
Apache License 2.0
1.72k stars 235 forks source link

AttributeError: 'NoneType' object has no attribute 'id' #644

Closed evandrocoan closed 6 years ago

evandrocoan commented 6 years ago

view.window().active_view() can return None on special views like image views.

    Traceback (most recent call last):
  File "F:\SublimeText\sublime_plugin.py", line 389, in run_callback
    expr()
  File "F:\SublimeText\sublime_plugin.py", line 530, in <lambda>
    run_callback('on_activated', callback, lambda: callback.on_activated(v))
  File "F:\SublimeText\Data\Packages\TypeScript\typescript\listeners\listeners.py", line 22, in on_activated
    if is_special_view(view):
  File "F:\SublimeText\Data\Packages\TypeScript\typescript\libs\view_helpers.py", line 120, in is_special_view
    return view is not None and view.window() and view.id() != view.window().active_view().id()
AttributeError: 'NoneType' object has no attribute 'id'