File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export default class FluentVue {
13
13
format ( key : string , value ?: object ) : string {
14
14
const message = this . options . bundle . getMessage ( key )
15
15
16
- if ( message == null || message . value == null ) {
16
+ if ( message === undefined ) {
17
17
warn ( false , `Could not find translation for key [${ key } ]` )
18
18
return key
19
19
}
Original file line number Diff line number Diff line change @@ -28,16 +28,16 @@ declare module '@fluent/bundle' {
28
28
class Pattern { }
29
29
30
30
class MessageInfo {
31
- value : Pattern | null
31
+ value : Pattern
32
32
attributes : Record < string , Pattern >
33
33
}
34
34
35
35
export class FluentBundle {
36
36
constructor ( locales : string | string [ ] , options ?: FluentBundleContructorOptions )
37
37
locales : string [ ]
38
38
hasMessage ( id : string ) : boolean
39
- getMessage ( id : string ) : MessageInfo
40
- formatPattern ( message : Pattern | null , args ?: object , errors ?: Array < string | Error > ) : string
39
+ getMessage ( id : string ) : MessageInfo | undefined
40
+ formatPattern ( message : Pattern , args ?: object , errors ?: Array < string | Error > ) : string
41
41
addResource ( res : FluentResource ) : string [ ]
42
42
}
43
43
}
You can’t perform that action at this time.
0 commit comments