Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code typo in Caching middleware example #61

Open
sebilasse opened this issue May 27, 2021 · 0 comments
Open

Code typo in Caching middleware example #61

sebilasse opened this issue May 27, 2021 · 0 comments

Comments

@sebilasse
Copy link

There is a typo in Learn/Middleware Fundamentals in the
src/middleware/ValueCachingMiddleware.ts

It reads

export const ValueCachingMiddleware = factory(({ middleware: { defer, icache }}) => {
    get(key: string) { 
      // ...
    }
}

but it returns an object and should read

export const ValueCachingMiddleware = factory(({ middleware: { defer, icache }}) => ({
    get(key: string) { 
      // ...
    }
})

(missing brackets or return)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant