Correct spelling of domLens
This commit is contained in:
parent
9b738bd589
commit
5115de451f
1 changed files with 4 additions and 4 deletions
|
@ -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
|
Loading…
Reference in a new issue