mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00: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…
Add table
Add a link
Reference in a new issue