Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Feb 4, 2022
1 parent a99d736 commit 8639a17
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/common/Bond.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions frontend/components/CellOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/components/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8639a17

Please sign in to comment.