Skip to content

Commit 55ede35

Browse files
committed
modified if statements
1 parent dd51b95 commit 55ede35

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

Diff for: src/traces/scattergl/index.js

+8-20
Original file line numberDiff line numberDiff line change
@@ -295,27 +295,15 @@ function sceneUpdate(gd, subplot) {
295295

296296
// remove scene resources
297297
scene.destroy = function destroy() {
298-
if((scene.fill2d) &&
299-
(scene.fill2d.destroy)) {
300-
scene.fill2d.destroy();}
301-
if((scene.scatter2d) &&
302-
(scene.scatter2d.destroy)) {
303-
scene.scatter2d.destroy();}
304-
if((scene.error2d) &&
305-
(scene.error2d.destroy)) {
306-
scene.error2d.destroy();}
307-
if((scene.line2d) &&
308-
(scene.line2d.destroy)) {
309-
scene.line2d.destroy();}
310-
if((scene.select2d) &&
311-
(scene.select2d.destroy)) {
312-
scene.select2d.destroy();}
298+
if(scene.fill2d && scene.fill2d.destroy) scene.fill2d.destroy();
299+
if(scene.scatter2d && scene.scatter2d.destroy) scene.scatter2d.destroy();
300+
if(scene.error2d && scene.error2d.destroy) scene.error2d.destroy();
301+
if(scene.line2d && scene.line2d.destroy) scene.line2d.destroy();
302+
if(scene.select2d && scene.select2d.destroy) scene.select2d.destroy();
313303
if(scene.glText) {
314-
scene.glText.forEach(
315-
function(text) {
316-
if(text.destroy) text.destroy();
317-
}
318-
);
304+
scene.glText.forEach(function(text) {
305+
if(text.destroy) text.destroy();
306+
});
319307
}
320308

321309
scene.lineOptions = null;

0 commit comments

Comments
 (0)