mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use folder name when metadata name is empty string or non-string
This commit is contained in:
@@ -45,7 +45,8 @@ class Package
|
||||
throw error unless ignoreErrors
|
||||
|
||||
metadata ?= {}
|
||||
metadata.name ?= packageName
|
||||
unless typeof metadata.name is 'string' and metadata.name.length > 0
|
||||
metadata.name = packageName
|
||||
|
||||
if includeDeprecatedAPIs and metadata.stylesheetMain?
|
||||
deprecate("Use the `mainStyleSheet` key instead of `stylesheetMain` in the `package.json` of `#{packageName}`", {packageName})
|
||||
|
||||
Reference in New Issue
Block a user