Correct spelling of domLens

This commit is contained in:
Talia 2024-02-06 11:20:08 +01:00
parent 9b738bd589
commit 5115de451f
Signed by: darkwiiplayer
GPG Key ID: 7808674088232B3E
1 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
export const lense = (methods, extra) => { export const lens = (methods, extra) => {
if (extra) return lense(extra)(methods) if (extra) return lens(extra)(methods)
const traps = { const traps = {
get(target, prop) { get(target, prop) {
@ -55,9 +55,9 @@ export const lense = (methods, extra) => {
} }
return element => { return element => {
if (!(element instanceof Element)) throw(new Error("Creating domLense on non-element")) if (!(element instanceof Element)) throw(new Error("Creating domLens on non-element"))
return new Proxy(element, traps) return new Proxy(element, traps)
} }
} }
export default lense export default lens