diff --git a/frontend/common/Bond.js b/frontend/common/Bond.js index 22df007c66..3a7f594526 100644 --- a/frontend/common/Bond.js +++ b/frontend/common/Bond.js @@ -155,7 +155,8 @@ export const add_bonds_listener = (node, on_bond_change, known_values) => { // see the docs on Generators.input from observablehq/stdlib let skippped_first = false - for (let val of input_generator(bond_node.firstElementChild)) { + const bound_element_node = bond_node.firstElementChild + for (let val of input_generator(bound_element_node)) { if (node_is_invalidated) break if (skippped_first === false) { diff --git a/frontend/components/CellOutput.js b/frontend/components/CellOutput.js index c28432ba92..029dd4e4f4 100644 --- a/frontend/components/CellOutput.js +++ b/frontend/components/CellOutput.js @@ -240,6 +240,7 @@ let execute_inside_script_tag_that_replaces = async (script_element, fn) => { // Mimick as much as possible from the original script (only attributes but sure) let new_script_tag = document.createElement("script") for (let attr of script_element.attributes) { + //@ts-ignore because of https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1260 new_script_tag.attributes.setNamedItem(attr.cloneNode(true)) } diff --git a/frontend/components/Editor.js b/frontend/components/Editor.js index 6c23d0130b..a6e56ae78f 100644 --- a/frontend/components/Editor.js +++ b/frontend/components/Editor.js @@ -852,10 +852,10 @@ patch: ${JSON.stringify( try { await Promise.all([ this.client.send("update_notebook", { updates: changes }, { notebook_id: this.state.notebook.notebook_id }, false).then((response) => { - if (response.message.response.update_went_well === "👎") { + if (response.message?.response?.update_went_well === "👎") { // We only throw an error for functions that are waiting for this // Notebook state will already have the changes reversed - throw new Error(`Pluto update_notebook error: ${response.message.response.why_not})`) + throw new Error(`Pluto update_notebook error: (from Julia: ${response.message.response.why_not})`) } }), this.setStatePromise({ diff --git a/tsconfig.json b/tsconfig.json index 325a962efa..3810a2de99 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ES2021", "module": "ES2020", - "lib": ["ES2021", "DOM", "WebWorker"], + "lib": ["ES2021", "DOM", "WebWorker", "DOM.Iterable"], "allowJs": true, "checkJs": true, "noEmit": true,