mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Always return Disposable from maintain{Config,Grammar}
This commit is contained in:
@@ -157,7 +157,7 @@ export default class TextEditorRegistry {
|
||||
// configuration.
|
||||
maintainConfig (editor) {
|
||||
if (this.editorsWithMaintainedConfig.has(editor)) {
|
||||
return
|
||||
return new Disposable(noop)
|
||||
}
|
||||
this.editorsWithMaintainedConfig.add(editor)
|
||||
|
||||
@@ -202,7 +202,7 @@ export default class TextEditorRegistry {
|
||||
// grammar.
|
||||
maintainGrammar (editor) {
|
||||
if (this.editorsWithMaintainedGrammar.has(editor)) {
|
||||
return
|
||||
return new Disposable(noop)
|
||||
}
|
||||
|
||||
this.editorsWithMaintainedGrammar.add(editor)
|
||||
@@ -391,6 +391,8 @@ function shouldEditorUseSoftTabs (editor, tabType, softTabs) {
|
||||
}
|
||||
}
|
||||
|
||||
function noop () {}
|
||||
|
||||
class ScopedSettingsDelegate {
|
||||
constructor (config) {
|
||||
this.config = config
|
||||
|
||||
Reference in New Issue
Block a user