mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Clear font style in afterEach so it doesn't cause test pollution
This commit is contained in:
@@ -742,9 +742,9 @@ class Editor extends View
|
||||
setFontFamily: (fontFamily) ->
|
||||
return if fontFamily == undefined
|
||||
headTag = $("head")
|
||||
styleTag = headTag.find("style.font-family")
|
||||
styleTag = headTag.find("style.editor-font-family")
|
||||
if styleTag.length == 0
|
||||
styleTag = $$ -> @style class: 'font-family'
|
||||
styleTag = $$ -> @style class: 'editor-font-family'
|
||||
headTag.append styleTag
|
||||
|
||||
styleTag.text(".editor {font-family: #{fontFamily}}")
|
||||
@@ -752,6 +752,9 @@ class Editor extends View
|
||||
|
||||
getFontFamily: -> @css("font-family")
|
||||
|
||||
clearFontFamily: ->
|
||||
$('head style.editor-font-family').remove()
|
||||
|
||||
redraw: ->
|
||||
return unless @hasParent()
|
||||
return unless @attached
|
||||
|
||||
Reference in New Issue
Block a user