From 3def20417dd07ea4affcc5949d6977d33d00128a Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Thu, 2 Nov 2023 18:43:12 +0200 Subject: [PATCH] Replace an instance of substring with startswith --- lib/GameResolver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GameResolver.js b/lib/GameResolver.js index 2139033..1bb5739 100644 --- a/lib/GameResolver.js +++ b/lib/GameResolver.js @@ -12,7 +12,7 @@ export default class GameResolver { lookup (type) { if (!type) { throw Error('No game specified') } - if (type.substring(0, 9) === 'protocol-') { + if (type.startsWith('protocol-')) { return { protocol: type.substring(9) }