mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Buffer with no url returns Text as its mode.
This commit is contained in:
@@ -23,7 +23,7 @@ class Buffer
|
||||
getMode: ->
|
||||
return @mode if @mode
|
||||
|
||||
extension = @url.split('/').pop().split('.').pop()
|
||||
extension = if @url then @url.split('/').pop().split('.').pop() else null
|
||||
modeName = switch extension
|
||||
when "js" then "javascript"
|
||||
else "text"
|
||||
|
||||
Reference in New Issue
Block a user