vaderjs 1.9.6 → 1.9.7

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/main.js +3 -1
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -216,11 +216,13 @@ async function generateApp() {
216
216
  r = r.replace(process.cwd().replace(/\\/g, '/') + '/app', '')
217
217
  r = r.replace('.jsx', '.js').replace('.tsx', '.js')
218
218
  fs.mkdirSync(path.join(process.cwd() + '/dist', path.dirname(r)), { recursive: true })
219
+ let params = routes.match(route).params || {}
220
+ // handle route params multiple and
219
221
  fs.writeFileSync(process.cwd() + '/dist/' + path.dirname(r) + '/' + path.basename(r), `
220
222
  let route = window.location.pathname.split('/').filter(v => v !== '')
221
223
  let params = {
222
224
  ${Object.keys(routes.match(route).params || {}).length > 0 ? Object.keys(routes.match(route).params || {}).map(p => {
223
- return `${p}: route[${Object.keys(routes.match(route).params).indexOf(p) + Object.keys(routes.match(route).params).length}]`
225
+ return `${p}: route[${Object.keys(routes.match(route).params || {}).indexOf(p)}]`
224
226
  }).join(',') : ""}
225
227
  }
226
228
  \n${code}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vaderjs",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
4
4
  "description": "A simple and powerful JavaScript library for building modern web applications.",
5
5
  "bin": {
6
6
  "vaderjs": "./main.js"