mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
ElTable's doLayout method is debounced and scheduled (relying on setTimeout) which causes problems in testing(Vitest). Sometimes the testing environment(jsdom) is destroyed before doLayout() executes which causes error due to requestAnimationFrame not existing. To mitigate this issue can check if the window exists which is a good indication that jsdom has not been thorn down yet.