Skip to content

Commit

Permalink
provide better fallback if uiRootPath config setting cannot be found …
Browse files Browse the repository at this point in the history
…or is empty
  • Loading branch information
mojavelinux committed Nov 14, 2023
1 parent e829f1f commit d1f7ed1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/06-copy-to-clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
var TRAILING_SPACE_RX = / +$/gm

var config = (document.getElementById('site-script') || { dataset: {} }).dataset
var uiRootPath = config.uiRootPath == null ? '.' : config.uiRootPath
var svgAs = config.svgAs
var supportsCopy = window.navigator.clipboard
var svgAs = config.svgAs
var uiRootPath = (config.uiRootPath == null ? window.uiRootPath : config.uiRootPath) || '.'

;[].slice.call(document.querySelectorAll('.doc pre.highlight, .doc .literalblock pre')).forEach(function (pre) {
var code, language, lang, copy, toast, toolbox
Expand Down

0 comments on commit d1f7ed1

Please sign in to comment.