mirror of
https://github.com/atom/atom.git
synced 2026-01-26 15:28:27 -05:00
Disallow duplicate keys when loading package keymaps
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
59189dc0d5
commit
db781dd54f
@@ -52,7 +52,7 @@
|
||||
"scandal": "^2.2.1",
|
||||
"scoped-property-store": "^0.17.0",
|
||||
"scrollbar-style": "^3.2",
|
||||
"season": "^5.3",
|
||||
"season": "^5.4",
|
||||
"semver": "^4.3.3",
|
||||
"service-hub": "^0.7.2",
|
||||
"sinon": "1.17.4",
|
||||
|
||||
@@ -251,7 +251,7 @@ class Package
|
||||
if @bundledPackage and @packageManager.packagesCache[@name]?
|
||||
@keymaps = (["#{@packageManager.resourcePath}#{path.sep}#{keymapPath}", keymapObject] for keymapPath, keymapObject of @packageManager.packagesCache[@name].keymaps)
|
||||
else
|
||||
@keymaps = @getKeymapPaths().map (keymapPath) -> [keymapPath, CSON.readFileSync(keymapPath) ? {}]
|
||||
@keymaps = @getKeymapPaths().map (keymapPath) -> [keymapPath, CSON.readFileSync(keymapPath, allowDuplicateKeys: false) ? {}]
|
||||
return
|
||||
|
||||
loadMenus: ->
|
||||
|
||||
Reference in New Issue
Block a user