Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix constructor casts dataset authentication to a POJO #485

Merged
merged 1 commit into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/cedar/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed
- fix constructor casts dataset authentication to a POJO

## [1.1.0]

### Added
Expand Down
6 changes: 1 addition & 5 deletions packages/cedar/src/Chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { IDataset, ISeries } from './common'
import { getChartData } from './dataset'
import { queryDatasets } from './query/query'

function clone(json) {
return JSON.parse(JSON.stringify(json))
}

// TODO: where should these interfaces live?

/**
Expand Down Expand Up @@ -114,7 +110,7 @@ export class Chart {

if (definition) {
// set the definition
this.definition(clone(definition))
this.definition(definition)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically this is a breaking change, but since chart.defintion(newDef) didn't clone, I figure we could make it consistent

}
}

Expand Down