mirror of
https://github.com/atom/atom.git
synced 2026-02-04 03:35:20 -05:00
Use fs.extension instead of regex
This commit is contained in:
@@ -8,8 +8,8 @@ class AtomTheme extends Theme
|
||||
@stylesheets[stylesheetPath] = fs.read(stylesheetPath)
|
||||
|
||||
load: ->
|
||||
if /\.css$/.test(@path)
|
||||
@loadStylesheet @path
|
||||
if fs.extension(@path) is '.css'
|
||||
@loadStylesheet(@path)
|
||||
else
|
||||
metadataPath = fs.resolveExtension(fs.join(@path, 'package'), ['cson', 'json'])
|
||||
stylesheetNames = fs.readObject(metadataPath).stylesheets
|
||||
|
||||
Reference in New Issue
Block a user