Skip to content

Commit

Permalink
Merge pull request #131 from contentstack/next
Browse files Browse the repository at this point in the history
Merge next to master
  • Loading branch information
harshithad0703 authored Feb 19, 2024
2 parents b6c6f4f + cda74df commit 124e06f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [v1.15.3](https://github.com/contentstack/contentstack-management-javascript/tree/v1.15.3) (2024-02-16)
- Fix
- Fix for updating entry
## [v1.15.2](https://github.com/contentstack/contentstack-management-javascript/tree/v1.15.2) (2024-02-09)
- Fix
- Adds params support in taxonomy export method
- Adds sanity test cases
## [v1.15.1](https://github.com/contentstack/contentstack-management-javascript/tree/v1.15.1) (2024-01-29)
- Feature
- Taxonomy Import/Export test cases are added
Expand Down
4 changes: 2 additions & 2 deletions lib/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ function isAsset (data) {
}

export function cleanAssets (data) {
if (data && typeof data === "object" && Object.keys(data).length > 0) {
if (data && typeof data === "object") {
const keys = Object.keys(data);
for (const key of keys) {
if (typeof data[key] === "object" && Object.keys(data[key]).length > 0) {
if (data[key] !== null && data[key] !== undefined && typeof data[key] === "object") {
if (isAsset(data[key])) {
data[key] = (Array.isArray(data[key])) ? data[key].map(element => element.uid) : data[key].uid;
} else {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/management",
"version": "1.15.2",
"version": "1.15.3",
"description": "The Content Management API is used to manage the content of your Contentstack account",
"main": "./dist/node/contentstack-management.js",
"browser": "./dist/web/contentstack-management.js",
Expand Down Expand Up @@ -52,7 +52,7 @@
"author": "Contentstack",
"license": "MIT",
"dependencies": {
"@slack/bolt": "^3.17.0",
"@slack/bolt": "^3.17.1",
"axios": "^1.6.5",
"form-data": "^3.0.1",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion test/sanity-check/api/organization-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Organization api test', () => {
it('should fetch organization', done => {
organization.fetch()
.then((organizations) => {
expect(organizations.name).to.be.equal('CLI Branches', 'Organization name dose not match')
expect(organizations.name).not.to.be.equal(null, 'Organization does not exist')
done()
})
.catch(done)
Expand Down

0 comments on commit 124e06f

Please sign in to comment.