mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-09 06:34:53 +03:00
fixed up a couple of TS compilation errors
This commit is contained in:
parent
2ab26e22f1
commit
de831ad38a
|
@ -28,7 +28,10 @@ export class ClipboardService {
|
||||||
if ((document as any).selection) {
|
if ((document as any).selection) {
|
||||||
(document as any).selection.empty();
|
(document as any).selection.empty();
|
||||||
} else if (window.getSelection) {
|
} else if (window.getSelection) {
|
||||||
window.getSelection().removeAllRanges();
|
let seln = window.getSelection();
|
||||||
|
if (seln) {
|
||||||
|
seln.removeAllRanges();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,5 +73,5 @@ export function highlight(source: string, lang: string = DEFAULT_LANG): string {
|
||||||
if (!grammar) {
|
if (!grammar) {
|
||||||
grammar = Prism.languages[mapLang(lang)];
|
grammar = Prism.languages[mapLang(lang)];
|
||||||
}
|
}
|
||||||
return Prism.highlight(source, grammar);
|
return Prism.highlight(source, grammar, lang);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user