mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-12 22:50:54 +03:00
Set metadata to empty hash when missing
This commit is contained in:
parent
cd56d0a1d2
commit
856b378f54
@ -24,9 +24,10 @@ class AtomPackage extends Package
|
||||
loadMetadata: ->
|
||||
if metadataPath = fs.resolveExtension(fs.join(@path, "package"), ['cson', 'json'])
|
||||
@metadata = fs.readObject(metadataPath)
|
||||
@metadata ?= {}
|
||||
|
||||
loadKeymaps: ->
|
||||
if keymaps = @metadata?.keymaps
|
||||
if keymaps = @metadata.keymaps
|
||||
keymaps = keymaps.map (relativePath) =>
|
||||
fs.resolve(@keymapsDirPath, relativePath, ['cson', 'json', ''])
|
||||
keymap.load(keymapPath) for keymapPath in keymaps
|
||||
|
Loading…
Reference in New Issue
Block a user