MCPcopy
hub / github.com/streamlit/streamlit / ensureBlockNode

Method ensureBlockNode

frontend/lib/src/render-tree/AppRoot.ts:303–308  ·  view source on GitHub ↗
(
    node: AppNode | undefined,
    mainScriptHash: string = this.mainScriptHash
  )

Source from the content-addressed store, hash-verified

301 }
302
303 private ensureBlockNode(
304 node: AppNode | undefined,
305 mainScriptHash: string = this.mainScriptHash
306 ): BlockNode {
307 return (node as BlockNode) ?? new BlockNode(mainScriptHash)
308 }
309
310 /**
311 * Clears all nodes that are not associated with the mainScriptHash.

Callers 3

clearStaleNodesMethod · 0.95
clearTransientNodesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected