Skip to content

Commit

Permalink
Fixup: Fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ianguerin committed Jun 5, 2024
1 parent 904f908 commit 02990b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions src/js/collections/maps/viewfinder/ZoomPresets.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use strict";

define([
"underscore",
"backbone",
"models/maps/viewfinder/ZoomPresetModel",
], (_, Backbone, ZoomPresetModel) => {
define(["underscore", "backbone", "models/maps/viewfinder/ZoomPresetModel"], (
_,
Backbone,
ZoomPresetModel,
) => {
/**
* Determine if array is empty.
* Determine if array is empty.
* @param {Array} a The array in question.
* @returns {boolean} Whether the array is empty.
* @returns {boolean} Whether the array is empty.
*/
function isNonEmptyArray(a) {
return a && a.length && Array.isArray(a);
Expand Down Expand Up @@ -39,19 +39,19 @@ define([
*/

/**
* Parse values and return a list of models for creating a
* Parse values and return a list of models for creating a
* Backbone.Collection.
* @param {ZoomPresetsParseOptions} object Values to be parsed into the
* @param {ZoomPresetsParseOptions} object Values to be parsed into the
* Backbone.Collection.
* @returns {ZoomPresets} A collection of models representative of the
* @returns {ZoomPresets} A collection of models representative of the
* values passed in.
*/
parse({ zoomPresetObjects, allLayers }) {
if (isNonEmptyArray(zoomPresetObjects)) {
const zoomPresets = zoomPresetObjects.map((zoomPresetObj) => {
const enabledLayerIds = [];
const enabledLayerLabels = [];
allLayers.models.forEach(layer => {
allLayers.models.forEach((layer) => {
if (
zoomPresetObj.layerIds?.find(
(id) => id === layer.get("layerId"),
Expand Down
4 changes: 2 additions & 2 deletions src/js/models/maps/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ define([
ZoomPresets,
) => {
/**
* Determine if array is empty.
* Determine if array is empty.
* @param {Array} a The array in question.
* @returns {boolean} Whether the array is empty.
* @returns {boolean} Whether the array is empty.
*/
function isNonEmptyArray(a) {
return a && a.length && Array.isArray(a);
Expand Down

0 comments on commit 02990b9

Please sign in to comment.