mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 13:56:11 +01:00
always use template strings instead of string concatenation
This commit is contained in:
@@ -86,7 +86,7 @@ async function requireLibrary(library) {
|
||||
const loadedScriptPromises = {};
|
||||
|
||||
async function requireScript(url) {
|
||||
url = window.glob.assetPath + "/" + url;
|
||||
url = `${window.glob.assetPath}/${url}`;
|
||||
|
||||
if (!loadedScriptPromises[url]) {
|
||||
loadedScriptPromises[url] = $.ajax({
|
||||
@@ -106,7 +106,7 @@ async function requireCss(url, prependAssetPath = true) {
|
||||
|
||||
if (!cssLinks.some(l => l.endsWith(url))) {
|
||||
if (prependAssetPath) {
|
||||
url = window.glob.assetPath + "/" + url;
|
||||
url = `${window.glob.assetPath}/${url}`;
|
||||
}
|
||||
|
||||
$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', url));
|
||||
|
||||
Reference in New Issue
Block a user