From b39f82bc312780a91e9750819103ebbf499ab62a Mon Sep 17 00:00:00 2001 From: Friedrich Delgado Date: Wed, 12 Feb 2020 11:05:52 +0100 Subject: [PATCH] Workaround for #614 This is an obvious "fix" for my case and my app and the testcafe tests work. I don't know why oLoadedState is null here, why the legacy api is apparently used and there are lots of other things I don't know. --- src/jquery.dataTables.yadcf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.dataTables.yadcf.js b/src/jquery.dataTables.yadcf.js index cfbe966..9a7653f 100644 --- a/src/jquery.dataTables.yadcf.js +++ b/src/jquery.dataTables.yadcf.js @@ -4453,7 +4453,7 @@ if (!Object.entries) { } function saveTextKeyUpState(oTable, table_selector_jq_friendly, column_number, regex_check_box, null_checked, exclude) { - if (oTable.fnSettings().oFeatures.bStateSave === true && oTable.fnSettings().oLoadedState.yadcfState) { + if (oTable.fnSettings().oFeatures.bStateSave === true && oTable.fnSettings().oLoadedState && oTable.fnSettings().oLoadedState.yadcfState) { if (oTable.fnSettings().oLoadedState.yadcfState !== undefined && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] !== undefined) { oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number] = {