Skip to content

Commit 7cddeeb

Browse files
committed
fix
1 parent 72720fa commit 7cddeeb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/livecodes/languages/scss/lang-scss-compiler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ import { getLanguageCustomSettings } from '../../utils';
5858
const urlString = canonicalUrl.href;
5959
const extension = '.' + language; // .scss or .sass
6060
const result: Promise<{ contents: string; syntax: string }> = fetchStyles(urlString)
61-
.catch(() => fetchStyles(urlString + extension))
62-
.catch(() => fetchStyles(urlString + '.css'))
6361
.catch(() => {
6462
const urlParts = urlString.split('/');
6563
const filename = urlParts[urlParts.length - 1];
6664
const prefix = filename.startsWith('_') ? '' : '_';
6765
urlParts[urlParts.length - 1] = prefix + filename + extension;
6866
return fetchStyles(urlParts.join('/'));
6967
})
68+
.catch(() => fetchStyles(urlString + extension))
69+
.catch(() => fetchStyles(urlString + '.css'))
7070
.catch(() => fetchStyles(urlString + '/_index' + extension))
7171
.catch(
7272
() =>

0 commit comments

Comments
 (0)