Skip to content

Commit 23b1e12

Browse files
committed
Fixed JS MIME handling
1 parent 886d82e commit 23b1e12

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

holoviews/ipython/display_hooks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ..core.io import FileArchive
2222
from ..core.util import mimebundle_to_html
2323
from ..plotting import Plot
24+
from ..plotting.renderer import MIME_TYPES
2425
from ..util.settings import OutputSettings
2526
from .magics import OptsMagic, OutputMagic
2627

@@ -143,9 +144,9 @@ def wrapped(element):
143144
if mimebundle is None:
144145
return {}, {}
145146
mime_data, mime_metadata = mimebundle
146-
if 'text/javascript' in mime_data:
147+
if MIME_TYPES['js'] in mime_data:
147148
mime_data['text/html'] = mimebundle_to_html(mime_data)
148-
del mime_data['text/javascript']
149+
del mime_data[MIME_TYPES['js']]
149150

150151
# Only want to add to the archive for one display hook...
151152
disabled_suffixes = ['png_display', 'svg_display']

0 commit comments

Comments
 (0)