Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Dec 12, 2023
1 parent 9f30daa commit 551ca7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/alpinejs/src/magics/$id.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { interceptClone } from '../clone'
magic('id', (el, { cleanup }) => (name, key = null) => {
let cacheKey = `${name}${key ? `-${key}` : ''}`

return cacheIdByNameOnElement(el, cacheKey, cleanup, ()=> {
return cacheIdByNameOnElement(el, cacheKey, cleanup, () => {
let root = closestIdRoot(el, name)

let id = root
Expand All @@ -31,8 +31,8 @@ function cacheIdByNameOnElement(el, cacheKey, cleanup, callback)
{
if (! el._x_id) el._x_id = {}

// // We only want $id to run once per an element's lifecycle...
if (el._x_id[cacheKey]) return e._x_id[cacheKey]
// We only want $id to run once per an element's lifecycle...
if (el._x_id[cacheKey]) return el._x_id[cacheKey]

let output = callback()

Expand Down

0 comments on commit 551ca7a

Please sign in to comment.