Skip to content

Code typo in Caching middleware example  #61

Open
@sebilasse

Description

@sebilasse

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions