From d5e2c87b6488dbe4df8cbb15cf2a6e739e573583 Mon Sep 17 00:00:00 2001 From: koverg70 Date: Wed, 13 Nov 2019 13:17:59 +0100 Subject: [PATCH] fix for withTranslation.js: Unexpected token (28:39) as discussed in #982 --- src/withTranslation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/withTranslation.js b/src/withTranslation.js index a2a43c588..a9ead87ac 100644 --- a/src/withTranslation.js +++ b/src/withTranslation.js @@ -26,7 +26,7 @@ export function withTranslation(ns, options = {}) { I18nextWithTranslation.WrappedComponent = WrappedComponent; - const forwardRef = (props, ref) => ; + const forwardRef = (props, ref) => React.createElement(I18nextWithTranslation, Object.assign({}, props, { forwardedRef: ref })); return options.withRef ? React.forwardRef(forwardRef) : I18nextWithTranslation; };