Call the prototype method directly.

h/t @maxbrunsfeld
This commit is contained in:
joshaber
2016-02-25 14:49:07 -05:00
parent 768f5ee5ca
commit 55e1496b96

View File

@@ -47,7 +47,7 @@ class Workspace extends Model
# Etch, in which case it'd be `new`d. And when it's `new`d, `this` is always
# the newly created object.
realThis = this
@buildTextEditor = (params) -> realThis.buildTextEditor_(params)
@buildTextEditor = -> Workspace.prototype.buildTextEditor.apply(realThis, arguments)
@panelContainers =
top: new PanelContainer({location: 'top'})
@@ -556,7 +556,7 @@ class Workspace extends Model
# Extended: Create a new text editor.
#
# Returns a {TextEditor}.
buildTextEditor_: (params) ->
buildTextEditor: (params) ->
params = _.extend({
@config, @notificationManager, @packageManager, @clipboard, @viewRegistry,
@grammarRegistry, @project, @assert, @applicationDelegate