Skip to content

Commit

Permalink
chore: isolate the one actual jquery dependency (apache#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
suddjian authored and zhaoyongjie committed Nov 25, 2021
1 parent b189d5b commit ef84433
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@superset-ui/core": "0.18.2",
"d3": "^3.5.17",
"datatables.net-bs": "^1.10.15",
"jquery": "^3.6.0",
"prop-types": "^15.6.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/* eslint-disable react/sort-prop-types */
import dt from 'datatables.net-bs';
import PropTypes from 'prop-types';
import $ from 'jquery';
import {
getTimeFormatter,
getTimeFormatterForGranularity,
Expand All @@ -28,10 +29,7 @@ import { formatCellValue, formatDateCellValue } from './utils/formatCells';
import fixTableHeight from './utils/fixTableHeight';
import 'datatables.net-bs/css/dataTables.bootstrap.css';

if (window.$) {
dt(window, window.$);
}
const $ = window.$ || dt.$;
dt(window, $);

const propTypes = {
data: PropTypes.shape({
Expand Down

0 comments on commit ef84433

Please sign in to comment.