mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01:00
Only request facts if a repo is present
This commit is contained in:
parent
66f8aae310
commit
6dd7789a2a
@ -739,6 +739,7 @@ var Application =
|
||||
/* Retrieve the facts for the given repository type */
|
||||
;(function () {
|
||||
var el = document.querySelector("[data-md-source]");
|
||||
if (!el) return Promise.resolve([]);
|
||||
switch (el.dataset.mdSource) {
|
||||
case "github":
|
||||
return new _Material2.default.Source.Adapter.GitHub(el).fetch();
|
||||
|
@ -196,6 +196,7 @@ export default class Application {
|
||||
/* Retrieve the facts for the given repository type */
|
||||
;(() => {
|
||||
const el = document.querySelector("[data-md-source]")
|
||||
if (!el) return Promise.resolve([])
|
||||
switch (el.dataset.mdSource) {
|
||||
case "github": return new Material.Source.Adapter.GitHub(el).fetch()
|
||||
default: return Promise.resolve([])
|
||||
|
Loading…
Reference in New Issue
Block a user