Skip to content

Commit

Permalink
fix: use array check instead of object
Browse files Browse the repository at this point in the history
  • Loading branch information
solaris007 committed Nov 30, 2023
1 parent dfbcba1 commit ca51663
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/spacecat-shared-data-access/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@adobe/spacecat-shared-dynamo": "1.1.4",
"@adobe/spacecat-shared-utils": "1.1.0",
"@adobe/spacecat-shared-utils": "1.2.0",
"@aws-sdk/client-dynamodb": "3.454.0",
"@aws-sdk/lib-dynamodb": "3.454.0",
"uuid": "9.0.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/spacecat-shared-data-access/src/models/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* governing permissions and limitations under the License.
*/

import { hasText, isObject, isValidUrl } from '@adobe/spacecat-shared-utils';
import { hasText, isValidUrl } from '@adobe/spacecat-shared-utils';
import { Base } from './base.js';

/**
Expand Down Expand Up @@ -69,7 +69,7 @@ export const createSite = (data) => {
throw new Error('Base URL must be a valid URL');
}

if (!isObject(newState.audits)) {
if (!Array.isArray(newState.audits)) {
newState.audits = [];
}

Expand Down

0 comments on commit ca51663

Please sign in to comment.