Removed unnecessary non-null hints

This commit is contained in:
squidfunk 2022-10-04 15:42:29 +02:00
parent 6344549ecf
commit 7ca1c1d623
4 changed files with 5 additions and 5 deletions

View File

@ -245,7 +245,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.1ba198e5.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.6079f66d.min.js' | url }}"></script>
{% for path in config.extra_javascript %}
<script src="{{ path | url }}"></script>
{% endfor %}

View File

@ -70,14 +70,14 @@ export function fetchSourceFacts(
): Observable<SourceFacts> {
/* Try to match GitHub repository */
let match = url.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i)!
let match = url.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i)
if (match) {
const [, user, repo] = match
return fetchSourceFactsFromGitHub(user, repo)
}
/* Try to match GitLab repository */
match = url.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i)!
match = url.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i)
if (match) {
const [, base, slug] = match
return fetchSourceFactsFromGitLab(base, slug)