mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-18 01:30:39 +01:00
Replace an instance of substring with startswith
This commit is contained in:
parent
4de57545a9
commit
3def20417d
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ export default class GameResolver {
|
||||||
lookup (type) {
|
lookup (type) {
|
||||||
if (!type) { throw Error('No game specified') }
|
if (!type) { throw Error('No game specified') }
|
||||||
|
|
||||||
if (type.substring(0, 9) === 'protocol-') {
|
if (type.startsWith('protocol-')) {
|
||||||
return {
|
return {
|
||||||
protocol: type.substring(9)
|
protocol: type.substring(9)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue