aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/element-overflow-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/element-overflow-controller.js')
-rw-r--r--ext/js/display/element-overflow-controller.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/js/display/element-overflow-controller.js b/ext/js/display/element-overflow-controller.js
index e0b9035e..eb83dda4 100644
--- a/ext/js/display/element-overflow-controller.js
+++ b/ext/js/display/element-overflow-controller.js
@@ -157,11 +157,11 @@ export class ElementOverflowController {
* @returns {number|import('core').Timeout}
*/
_requestIdleCallback(callback, timeout) {
- if (typeof requestIdleCallback === 'function') {
- return requestIdleCallback(callback, {timeout});
- } else {
- return setTimeout(callback, timeout);
- }
+ return (
+ typeof requestIdleCallback === 'function' ?
+ requestIdleCallback(callback, {timeout}) :
+ setTimeout(callback, timeout)
+ );
}
/**