From 8be5d5af0f926d080fa30db4752b5efff7e4989e Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 5 Aug 2015 12:17:36 +0930 Subject: [PATCH] Still set username if user is undefined Fixes "Started 12 hours ago by undefined" on discussion author avatar tooltip --- js/lib/Translator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/lib/Translator.js b/js/lib/Translator.js index 777cc8a67..5f3dfd30d 100644 --- a/js/lib/Translator.js +++ b/js/lib/Translator.js @@ -60,7 +60,7 @@ export default class Translator { // future there should be a hook here to inspect the user and change the // translation key. This will allow a gender property to determine which // translation key is used. - if (input.user instanceof User) { + if ('user' in input) { const user = extract(input, 'user'); if (!input.username) input.username = username(user);