@srfnstack/fntags 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/fnroute.mjs +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srfnstack/fntags",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "author": "Robert Kempton <r@snow87.com>",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/srfnstack/fntags",
package/src/fnroute.mjs CHANGED
@@ -104,7 +104,12 @@ export const modRouter = ({ routePath, attrs, onerror, frame, sendRawPath, forma
104
104
  }
105
105
  const filePath = path ? routePath + ensureOnlyLeadingSlash(path) : routePath
106
106
 
107
- const p = moduleCache[filePath] ? Promise.resolve(moduleCache[filePath]) : import(filePath).then(m => { moduleCache[filePath] = m })
107
+ const p = moduleCache[filePath]
108
+ ? Promise.resolve(moduleCache[filePath])
109
+ : import(filePath).then(m => {
110
+ moduleCache[filePath] = m
111
+ return m
112
+ })
108
113
 
109
114
  p.then(module => {
110
115
  const route = module.default