mirror of
https://github.com/slap-editor/slap.git
synced 2024-11-09 19:31:01 +03:00
Simple fix for #120
Avoids raising a warning by placing `self.ready` in a function.
This commit is contained in:
parent
be47efecbc
commit
ab69224856
@ -77,7 +77,7 @@ Editor.prototype.open = Promise.method(function (path) {
|
||||
path = util.resolvePath(path);
|
||||
return chardet.detectFileAsync(path) // return Promise.resolve(chardet.detectFileSync(path))
|
||||
.then(function (encoding) { self.textBuf.setEncoding(encoding); })
|
||||
.then(self.ready) // ensures textBuf path-changed is triggered in _initHandlers
|
||||
.then(function () { self.ready; }) // ensures textBuf path-changed is triggered in _initHandlers
|
||||
.then(function () { return self.textBuf.setPath(path); })
|
||||
.then(function () { return self.textBuf.load(); })
|
||||
.then(function () { self.selection.setHeadPosition(new Point(0, 0)); })
|
||||
|
Loading…
Reference in New Issue
Block a user