Skip to content

Commit 769fa2d

Browse files
Proper usage of jsdoc optional param syntax (#815)
* Proper usage of jsdoc optional param syntax * Remove wrong @return in jsdoc
1 parent ce22406 commit 769fa2d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ Inspector.prototype = {
285285

286286
/**
287287
* Closes the editor and gives the control back to the scene
288-
* @return {[type]} [description]
289288
*/
290289
close: function () {
291290
this.opened = false;

src/lib/entity.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ export function updateEntity(entity, component, property, value) {
3535
* Remove an entity.
3636
*
3737
* @param {Element} entity Entity to remove.
38-
* @param {boolean} force (Optional) If true it won't ask for confirmation.
38+
* @param {boolean} [force=false] If true it won't ask for confirmation.
3939
*/
40-
export function removeEntity(entity, force) {
40+
export function removeEntity(entity, force = false) {
4141
if (entity) {
4242
if (
4343
force === true ||
@@ -81,9 +81,9 @@ function findClosestEntity(entity) {
8181

8282
/**
8383
* Remove the selected entity
84-
* @param {boolean} force (Optional) If true it won't ask for confirmation
84+
* @param {boolean} [force=false] If true it won't ask for confirmation.
8585
*/
86-
export function removeSelectedEntity(force) {
86+
export function removeSelectedEntity(force = false) {
8787
if (AFRAME.INSPECTOR.selectedEntity) {
8888
removeEntity(AFRAME.INSPECTOR.selectedEntity, force);
8989
}

0 commit comments

Comments
 (0)