Fixed #1696: infinite loop when using instant loading

This commit is contained in:
squidfunk 2020-05-16 14:28:16 +02:00
parent b775328cd9
commit 900c113e59
6 changed files with 11 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"assets/javascripts/bundle.js": "assets/javascripts/bundle.8566d47a.min.js", "assets/javascripts/bundle.js": "assets/javascripts/bundle.4e2bfc5d.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.8566d47a.min.js.map", "assets/javascripts/bundle.js.map": "assets/javascripts/bundle.4e2bfc5d.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.809e24aa.min.js", "assets/javascripts/vendor.js": "assets/javascripts/vendor.809e24aa.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.809e24aa.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.809e24aa.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.f6ebf1dc.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.f6ebf1dc.min.js",

View File

@ -179,7 +179,7 @@
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/vendor.809e24aa.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/vendor.809e24aa.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.8566d47a.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.4e2bfc5d.min.js' | url }}"></script>
{%- set translations = {} -%} {%- set translations = {} -%}
{%- for key in [ {%- for key in [
"clipboard.copy", "clipboard.copy",

View File

@ -383,8 +383,11 @@ export function initialize(config: unknown) {
/* Determine common prefix */ /* Determine common prefix */
let index = 0 let index = 0
while (a.charAt(index) === b.charAt(index)) if (a === b)
index++ index = a.length
else
while (a.charAt(index) === b.charAt(index))
index++
/* Replace common prefix (i.e. base) with effective base */ /* Replace common prefix (i.e. base) with effective base */
for (let i = 0; i < urls.length; i++) for (let i = 0; i < urls.length; i++)