Skip to content

Commit

Permalink
fix: actually delete fallback_code on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
trodrigues committed Jun 23, 2016
1 parent e78d437 commit e374294
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/create-space-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ export default function createSpaceApi ({
* .then(e => console.log(e))
*/
function createLocale (data) {
// TODO this should be removed when the fallback locale issues are fixed
// also remove deletion on wrapLocale in locale.js
delete data.fallback_code
return http.post('locales', data)
.then((response) => wrapLocale(http, response.data), errorHandler)
}
Expand Down
1 change: 1 addition & 0 deletions lib/entities/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export function wrapLocale (http, data) {
const locale = mixinToPlainObject(cloneDeep(data))
delete locale.internal_code
// TODO this should be removed when the fallback locale issues are fixed
// also remove deletion on createLocale in create-space-api
delete locale.fallback_code
enhanceWithMethods(locale, createLocaleApi(http))
return freezeSys(locale)
Expand Down

0 comments on commit e374294

Please sign in to comment.