File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -33,17 +33,8 @@ function createLocaleApi (http) {
33
33
* .then(locale => console.log(locale.name))
34
34
*/
35
35
update : function ( ) {
36
- // delete some properties which are returned by the server but shouldn't
37
- // be sent back.
38
36
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
- }
37
+ // this property shouldn't be sent back if it exists
47
38
delete locale . default
48
39
return createUpdateEntity ( {
49
40
http : http ,
@@ -77,6 +68,8 @@ function createLocaleApi (http) {
77
68
export function wrapLocale ( http , data ) {
78
69
const locale = mixinToPlainObject ( cloneDeep ( data ) )
79
70
delete locale . internal_code
71
+ // TODO this should be removed when the fallback locale issues are fixed
72
+ delete locale . fallback_code
80
73
enhanceWithMethods ( locale , createLocaleApi ( http ) )
81
74
return freezeSys ( locale )
82
75
}
You can’t perform that action at this time.
0 commit comments