Skip to content

Commit

Permalink
Import jquery instead of accessing from window
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Apr 14, 2021
1 parent 0c42b1a commit 4d591c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@wordpress/viewport": "file:../viewport",
"classnames": "^2.2.5",
"fast-average-color": "4.3.0",
"jquery": "^3.5.1",
"lodash": "^4.17.19",
"memize": "^1.1.0",
"moment": "^2.22.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/legacy-widget/edit/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import { debounce } from 'lodash';
import $ from 'jquery';

/**
* WordPress dependencies
Expand All @@ -20,8 +21,6 @@ import apiFetch from '@wordpress/api-fetch';
import { Button } from '@wordpress/components';
import { useInstanceId } from '@wordpress/compose';

const $ = window.jQuery;

export default function Form( { id, idBase, instance, setInstance } ) {
const { html, setFormData } = useForm( {
id,
Expand Down

0 comments on commit 4d591c5

Please sign in to comment.