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

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