Skip to content

Commit

Permalink
Update to Sapper 0.25.0 to fix a bug in nested routes
Browse files Browse the repository at this point in the history
When you were in /eli/code/code_civil and clicked on the nav to return
to /eli/code, the URL changed but not the content of the page (the
hydratation inside Sapper had a bug).

Bug: sveltejs/sapper#532
PR: sveltejs/sapper#539

Thanks to [email protected]!
  • Loading branch information
Seb35 committed Mar 9, 2019
1 parent 1d17947 commit d38e885
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"sapper": "^0.24.2",
"sapper": "^0.25.0",
"svelte": "^2.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/components/Nav.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<nav>
<ul>
<li><a class='{segment === undefined ? "selected" : ""}' href='.'>accueil</a></li>
<li><a class='{segment === "about" ? "selected" : ""}' href='about'>à propos</a></li>
<li><a rel=prefetch class='{segment === "eli" ? "selected" : ""}' href='eli/code'>codes</a></li>
<li><a class='{segment === undefined ? "selected" : ""}' href=".">accueil</a></li>
<li><a class='{segment === "about" ? "selected" : ""}' href="about">à propos</a></li>
<li><a rel="prefetch" class='{segment === "eli" ? "selected" : ""}' href="eli/code">codes</a></li>
</ul>
</nav>

Expand Down
2 changes: 1 addition & 1 deletion src/routes/eli/[nature]/[identifiant].html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<h1>{ucfirst(identifiant)}</h1>

<p>&lt; <a href="{base}/eli/{nature}">{ucfirst(nature)}s</a></p>
<p>&lt; <a rel="prefetch" href="{base}/eli/{nature}">{ucfirst(nature)}s</a></p>

<!-- I cannot affirm for now that the code is in force (or abrogated), see https://github.com/Legilibre/Archeo-Lex/issues/62 -->
<p>{#if etat === 'vigueur-future'}<span class="{nature}">{ucfirst(nature)} en {etat.replace('-', ' ')}{#if etat === 'vigueur'}&nbsp;(ou abrogé){/if}</span>&nbsp;;&nbsp;{/if}{versions.length} versions</p>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/eli/[nature]/[identifiant]/lc/[date].html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<h1>{ucfirst(identifiant)}</h1>

<p>&lt; <a href="{base}/eli/{nature}">{ucfirst(nature)}s</a> &lt; <a href="{base}/eli/{nature}/{identifiant}">{ucfirst(identifiant)}</a></p>
<p>&lt; <a rel="prefetch" href="{base}/eli/{nature}">{ucfirst(nature)}s</a> &lt; <a rel="prefetch" href="{base}/eli/{nature}/{identifiant}">{ucfirst(identifiant)}</a></p>

<div class="soustitre">Version consolidée {#if date !== '2222-02-22'}au {ISO86012dateFR(date)}{:else}à une future date indéterminée{/if} <span class="version">(version {condensat.substring(0, 7)})</span></div>

Expand Down

0 comments on commit d38e885

Please sign in to comment.