@sveltejs/kit 1.0.0-next.440 → 1.0.0-next.441

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.0.0-next.440",
3
+ "version": "1.0.0-next.441",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -109,23 +109,25 @@ function create_routes_and_nodes(cwd, config, fallback) {
109
109
 
110
110
  segment_map.set(
111
111
  id,
112
- segments.filter(Boolean).map((segment) => {
113
- /** @type {import('./types').Part[]} */
114
- const parts = [];
115
- segment.split(/\[(.+?)\]/).map((content, i) => {
116
- const dynamic = !!(i % 2);
117
-
118
- if (!content) return;
119
-
120
- parts.push({
121
- content,
122
- dynamic,
123
- rest: dynamic && content.startsWith('...'),
124
- type: (dynamic && content.split('=')[1]) || null
112
+ segments
113
+ .filter((segment) => segment !== '' && affects_path(segment))
114
+ .map((segment) => {
115
+ /** @type {import('./types').Part[]} */
116
+ const parts = [];
117
+ segment.split(/\[(.+?)\]/).map((content, i) => {
118
+ const dynamic = !!(i % 2);
119
+
120
+ if (!content) return;
121
+
122
+ parts.push({
123
+ content,
124
+ dynamic,
125
+ rest: dynamic && content.startsWith('...'),
126
+ type: (dynamic && content.split('=')[1]) || null
127
+ });
125
128
  });
126
- });
127
- return parts;
128
- })
129
+ return parts;
130
+ })
129
131
  );
130
132
 
131
133
  /** @type {import('types').RouteData} */
@@ -26,7 +26,7 @@ export function write_root(manifest_data, output) {
26
26
  while (l--) {
27
27
  pyramid = `
28
28
  {#if components[${l + 1}]}
29
- <svelte:component this={components[${l}]} data={data_${l}}>
29
+ <svelte:component this={components[${l}]} data={data_${l}} {errors}>
30
30
  ${pyramid.replace(/\n/g, '\n\t\t\t\t\t')}
31
31
  </svelte:component>
32
32
  {:else}