jupyter-ijavascript-utils 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/vega.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyter-ijavascript-utils",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Utilities for working with iJavaScript - a Jupyter Kernel",
5
5
  "homepage": "https://jupyter-ijavascript-utils.onrender.com/",
6
6
  "license": "MIT",
package/src/vega.js CHANGED
@@ -278,9 +278,11 @@ module.exports.embed = function embed(fn, options) {
278
278
  if (!context) throw (Error('No display sent. Expected to be called within iJavaScript'));
279
279
  const { $$: display, console: cellConsole } = context;
280
280
 
281
+ const cleanOptions = options || {};
282
+
281
283
  const {
282
284
  scripts = []
283
- } = options;
285
+ } = cleanOptions;
284
286
 
285
287
  display.async();
286
288
 
@@ -289,7 +291,7 @@ module.exports.embed = function embed(fn, options) {
289
291
  const { spec } = VegaLite.compile(vegaMarkers.toSpec());
290
292
 
291
293
  IJSUtils.htmlScript({
292
- ...options,
294
+ ...cleanOptions,
293
295
  data: spec,
294
296
  scripts: [
295
297
  ...scripts,