Commit ba60548
committed
Fix operator precedence bug causing corechart.js to load on all report pages
The condition in pmpro_report_members_per_level_init() had a precedence
bug — the || was not grouped with is_admin(), so the second clause
(page == pmpro-reports) fired on every reports page regardless of which
report was active. This caused corechart.js to be enqueued on pages like
the memberships report, resulting in google.charts.load() being called
twice and throwing: 'Google Charts loader.js can only be loaded once.'
Fixed by rewriting the condition to require both page and report params.1 parent 3506c97 commit ba60548
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments