From ad33d891479e01bfeec4280c5143fa0a3bf7ff10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Sat, 11 Nov 2017 18:21:55 +0100 Subject: [PATCH] Gjs in 3.24 doesn't support default values in destructured argument --- tiling.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tiling.js b/tiling.js index 312a9f1..58a571e 100644 --- a/tiling.js +++ b/tiling.js @@ -230,10 +230,16 @@ var max_height = primary.height - panelBox.height - margin_tb*2; var scaled_height = max_height*0.95; var scaled_y_offset = (max_height - scaled_height)/2; function move(meta_window, {x, y, - onComplete = () => {}, - onStart = () => {}, - delay = 0, - transition = 'easeInOutQuad'}) { + onComplete, + onStart, + delay, + transition}) { + + onComplete = onComplete || (() => {}); + onStart = onStart || (() => {}); + delay = delay || 0; + transition = transition || 'easeInOutQuad'; + let actor = meta_window.get_compositor_private() let buffer = actor.meta_window.get_buffer_rect(); let frame = actor.meta_window.get_frame_rect();