Bug 42277: Remove JS error when viewing a subscription
If no orders exist yet, there is a JS error in the console:
Uncaught TypeError: can't access property "DataTable", table is
undefined
Test plan:
0. Do no apply this patch
1. Create a new subscription and go to the detail view
2. Open the console and notice the JS error
3. Apply this patch
4. Confirm that the JS error is gone
5. Create an order from this subscription
6. Confirm that the orders table is displayed
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da121583a4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
parent
768f2a4882
commit
da718a2a57
|
|
@ -497,8 +497,8 @@
|
|||
|
||||
[% END %]
|
||||
|
||||
let table_dt = table.DataTable();
|
||||
$("#hide_received_orders").click(function(e){
|
||||
let table_dt = table?.DataTable();
|
||||
$("#hide_received_orders").click(function (e) {
|
||||
e.preventDefault();
|
||||
table_dt.columns(4).search('^$', {regex: true}).draw(); // Not empty "Receive date" columns
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue