Skip to content

Commit

Permalink
fix constructor casts dataset authentication to a POJO
Browse files Browse the repository at this point in the history
NOTE: no longer cloning definition that is passed in the constructor
  • Loading branch information
tomwayson committed Jan 13, 2021
1 parent 09c5740 commit 0b032e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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)
}
}

Expand Down

0 comments on commit 0b032e0

Please sign in to comment.