mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-29 15:11:52 +00:00
Upgraded to the newest version of react-intl
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import {InjectedIntl} from 'react-intl';
|
||||
import {IntlShape} from 'react-intl';
|
||||
import {TopolaError} from './error';
|
||||
|
||||
/**
|
||||
* Returns a translated message for the given error. If the message can't be
|
||||
* translated, the original error.message is returned.
|
||||
*/
|
||||
export function getI18nMessage(error: Error, intl: InjectedIntl): string {
|
||||
export function getI18nMessage(error: Error, intl: IntlShape): string {
|
||||
if (!(error instanceof TopolaError)) {
|
||||
return error.message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user