Explorar o código

Replace with direct checking

Shaun %!s(int64=2) %!d(string=hai) anos
pai
achega
e8e7d8bd43
Modificáronse 1 ficheiros con 0 adicións e 2 borrados
  1. 0 2
      src/router.js

+ 0 - 2
src/router.js

@@ -3,7 +3,6 @@ import { URLPattern } from './pattern'
 
 export class Router {
   #patterns = {}
-  #current
 
   add (route) {
     this.#patterns = {
@@ -17,7 +16,6 @@ export class Router {
     for (const [route, pattern] of Object.entries(this.#patterns)) {
       const found = URLPattern.match(target.path, pattern)
       if (found) {
-        this.#current = route
         return found === true ? {} : found
       }
     }