Uncaught TypeError: Cannot read properties of undefined (reading 'top') (v2021)

Hi, can you please help me, i’ve got error when i delete last record and refresh page , which is from F12 console error :
ew.js:8528 Uncaught TypeError: Cannot read properties of undefined (reading ‘top’)
at ew.js:8528:52
at i (ewcore.js:4537:92)
at ewcore.js:4696:9
at Array.o (ewcore.js:4488:26)
at o (ewcore.js:4521:11)
at u.done (ewcore.js:4706:7)
at ewcore.js:6307:12
at i (ewcore.js:4537:92)
at ewcore.js:4696:9
at Array.o (ewcore.js:4488:26)

Phpmaker v.2021 - PHP Version 7.4.29

What is the code in line 8528 of js/ew.js file?

the code is : scrollTop: $__default[‘default’](“#” + hash).offset().top //error

 loadjs.ready("load", function () {
    $__default['default'].views.settings.debugMode(ew.DEBUG);
    ew.setSessionTimer();
    ew.initPage();
    $__default['default']("#ew-modal-dialog").on("load.ew", ew.initPage);
    $__default['default']("#ew-add-opt-dialog").on("load.ew", ew.initPage);
    var hash = ew.currentUrl.searchParams.get("hash");
    if (hash) $__default['default']("html, body").animate({
      scrollTop: $__default['default']("#" + hash).offset().top //error
    }, 800);
    ew.removeSpinner();
    $document.trigger("load");
  }); // Default "addoption" event (fired before adding new option to selection list)

We suggest you to use the latest version, as of today is v2023, since v2021 is too old and there are no more support for this version.