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