Use delete keyword

This commit is contained in:
decentral1se 2021-06-01 18:20:00 +02:00
parent e746641fba
commit 12a159c6bb
No known key found for this signature in database
GPG Key ID: 92DAD76BD9567B8A

View File

@ -1,4 +1,5 @@
"use strict"; // Note(decentral1se): in order to use the `delete` operator
// "use strict";
// //
// Voicegardens front-end Javascript // Voicegardens front-end Javascript
@ -92,7 +93,7 @@ function gardenOfflineLimits() {
for (let i = 0; i < shapes.length; i++) { for (let i = 0; i < shapes.length; i++) {
let shape = shapes[i]; let shape = shapes[i];
shape.hide(); shape.hide();
shape = null; delete shape;
} }
shapes = []; shapes = [];