Skip to content

Commit

Permalink
Revert "chore: isolate the one actual jquery dependency (apache#1339)" (
Browse files Browse the repository at this point in the history
apache#1355)

This reverts commit 19f8f6a09c284de157c7179d43275ea2344b2372.
  • Loading branch information
suddjian authored and zhaoyongjie committed Nov 17, 2021
1 parent ef273e6 commit 64dca43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"@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,7 +19,6 @@
/* 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 @@ -29,7 +28,10 @@ import { formatCellValue, formatDateCellValue } from './utils/formatCells';
import fixTableHeight from './utils/fixTableHeight';
import 'datatables.net-bs/css/dataTables.bootstrap.css';

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

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

0 comments on commit 64dca43

Please sign in to comment.