Skip to content

Commit 98795c0

Browse files
authored
Merge pull request #55 from contentful/fallback-fix
fix: Don't filter out fallback_code property
2 parents b15f154 + 1644ad3 commit 98795c0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/entities/locale.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,15 @@ function createLocaleApi (http) {
3636
// delete some properties which are returned by the server but shouldn't
3737
// be sent back.
3838
const locale = this
39+
// for the default locale, we can't send the fallback code back or we get an error
40+
if (locale.default) {
41+
delete locale.fallback_code
42+
} else {
43+
// temporary fix due to property naming weirdness
44+
locale.fallbackCode = locale.fallback_code
45+
delete locale.fallback_code
46+
}
3947
delete locale.default
40-
delete locale.fallback_code
4148
return createUpdateEntity({
4249
http: http,
4350
entityPath: 'locales',

0 commit comments

Comments
 (0)