add css to the data object to be saved (#2188)

This commit is contained in:
Alanna Scott 2017-02-16 10:37:29 -08:00 committed by GitHub
parent 615d8f1624
commit 3b023e5eaa
2 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class Controls extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
css: props.dashboard.css,
css: props.dashboard.css || '',
cssTemplates: [],
};
}

View File

@ -40,6 +40,7 @@ class SaveModal extends React.PureComponent {
saveDashboardRequest(data, url, saveType) {
const dashboard = this.props.dashboard;
const saveModal = this.modal;
Object.assign(data, { css: this.props.css });
$.ajax({
type: 'POST',
url,