Skip to content

Commit e374294

Browse files
committed
fix: actually delete fallback_code on creation
1 parent e78d437 commit e374294

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/create-space-api.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ export default function createSpaceApi ({
394394
* .then(e => console.log(e))
395395
*/
396396
function createLocale (data) {
397+
// TODO this should be removed when the fallback locale issues are fixed
398+
// also remove deletion on wrapLocale in locale.js
399+
delete data.fallback_code
397400
return http.post('locales', data)
398401
.then((response) => wrapLocale(http, response.data), errorHandler)
399402
}

lib/entities/locale.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export function wrapLocale (http, data) {
6969
const locale = mixinToPlainObject(cloneDeep(data))
7070
delete locale.internal_code
7171
// TODO this should be removed when the fallback locale issues are fixed
72+
// also remove deletion on createLocale in create-space-api
7273
delete locale.fallback_code
7374
enhanceWithMethods(locale, createLocaleApi(http))
7475
return freezeSys(locale)

0 commit comments

Comments
 (0)