From a5ed5be3cf471911d4fda3711108b7855a93e348 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 23 Jan 2019 14:47:31 +0000 Subject: [PATCH] Fix literal </> in notifications Apparently I couldn't decide whether I was writing indexOf(...) > -1 or .includes() Fixes https://github.com/vector-im/riot-web/issues/8230 --- src/vector/platform/ElectronPlatform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index a20b33132..927b63a1d 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -136,7 +136,7 @@ export default class ElectronPlatform extends VectorBasePlatform { // maybe we should pass basic styling (italics, bold, underline) through from MD // we only have to strip out < and > as the spec doesn't include anything about things like & // so we shouldn't assume that all implementations will treat those properly. Very basic tag parsing is done. - if (navigator.userAgent.indexOf('Linux')) { + if (navigator.userAgent.includes('Linux')) { msg = msg.replace(//g, '>'); }