Commit ae5a8e94 authored by Jeff Sturek's avatar Jeff Sturek
Browse files

Add try/catch to ignore DCFUtility errors

parent aa3f56b9
......@@ -15,9 +15,13 @@
<?php echo $maincontent ?>
</main>
<script>
require(['https://unlcms.unl.edu/wdn/templates_5.3/js/compressed/dcf-utility.js', 'https://unlcms.unl.edu/wdn/templates_5.3/js/compressed/dcf-tabs.js'], function() {
DCFUtility.flagSupportsWebP();
DCFUtility.flagSupportsJavaScript();
require(['/wdn/templates_5.3/js/compressed/dcf-utility.js', '/wdn/templates_5.3/js/compressed/dcf-tabs.js'], function() {
try {
DCFUtility.flagSupportsWebP();
DCFUtility.flagSupportsJavaScript();
} catch(e) {
// do nothing;
}
var tabs = document.querySelectorAll('.dcf-tabs');
var unlTabs = new DCFTabs(tabs);
......
......@@ -18,8 +18,12 @@
<script>
require(['https://unlcms.unl.edu/wdn/templates_5.3/js/compressed/dcf-utility.js',
'https://unlcms.unl.edu/wdn/templates_5.3/js/compressed/dcf-tabs.js'], function() {
DCFUtility.flagSupportsWebP();
DCFUtility.flagSupportsJavaScript();
try {
DCFUtility.flagSupportsWebP();
DCFUtility.flagSupportsJavaScript();
} catch(e) {
// do nothing;
}
var tabs = document.querySelectorAll('.dcf-tabs');
var unlTabs = new DCFTabs(tabs);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment