Replace an instance of substring with startswith

This commit is contained in:
CosminPerRam 2023-11-02 18:43:12 +02:00
parent 4de57545a9
commit 3def20417d
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}