Skip to content

Commit

Permalink
Remove unused arguments from snapshot method
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHenninger committed May 8, 2024
1 parent 03569c3 commit c6745ec
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/library/src/plugins/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,9 @@ const renderBreadcrumbs = (controller: Controller) => {

// Hydration logic -------------------------------------------------------------

const snapshot = (context: Component, target?: string[], seed?: string) => {
const snapshot = (context: Component, seed: string) => {
// Calculate set of current ids
const targetId =
target ?? context.internals.controller.currentStack.slice(1).map(c => c.id)
const targetId = context.internals.controller.currentStack.slice(1).map(c => c.id)

// Get data and state
const data = context.global.datastore.data
Expand All @@ -362,7 +361,7 @@ const snapshot = (context: Component, target?: string[], seed?: string) => {
keep: true,
}),
)
window.sessionStorage.setItem('labjs-debug-seed', seed ?? '')
window.sessionStorage.setItem('labjs-debug-seed', seed)
}

const hydrate = async (component: Component, data: any) => {
Expand Down Expand Up @@ -452,7 +451,7 @@ export default class Debug {
.querySelector('.labjs-debug-snapshot')!
.addEventListener('click', e => {
e.preventDefault()
snapshot(this.#context!, undefined, this.#seed)
snapshot(this.#context!, this.#seed)
})

this.#container
Expand Down

0 comments on commit c6745ec

Please sign in to comment.