Commit a4dd6b1
committed
chore(jquery-form): disable AMD loading for compatibility with DXP
In our previous fork of this module, we have an `if (false)` condition
to prevent the module from calling `define`:
https://github.com/liferay/liferay-portal/blob/19d993d6e3c0dd6865924bf23f75992f52fc355e/modules/apps/frontend-js/frontend-js-jquery-web/src/main/resources/META-INF/resources/jquery/form.js#L33
That's pretty ugly, and just stripping out the conditional is a still a
pretty minimal edit, so let's go with that instead. Note that if you
look at the DXP version, we wrap the entire function in a wrapper that
just passes in `window.$` as `jQuery`, but that changes the indentation
level of the entire file, so to make a minimal edit here we don't do
that.
After this change, we're basically identical to what is in DXP (compared
that by source-formatting the file, overwriting it with the DXP copy,
and inspecting the changes with `git diff -w`).1 parent 880ea16 commit a4dd6b1
1 file changed
+1
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 15 | + | |
23 | 16 | | |
24 | 17 | | |
25 | 18 | | |
| |||
0 commit comments