Skip to content

Commit

Permalink
only enable ajax features if fetch is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewatson committed May 31, 2021
1 parent 072a71b commit 03d641c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions public/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import $ from "cash-dom";
import { initTimer } from './timer';
import { initAjax } from "./ajax";

initTimer();
initAjax();
if (fetch) {
initTimer();
initAjax();
}

function initFlatpickr() {
flatpickr("#rd", {
Expand All @@ -15,4 +17,4 @@ function initFlatpickr() {
}

initFlatpickr();
$(window).on('postbodyswap', initFlatpickr)
$(window).on('postbodyswap', initFlatpickr);

0 comments on commit 03d641c

Please sign in to comment.