Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Commit f47c462

Browse files
committed
listcommands try 4
1 parent c460795 commit f47c462

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/commands.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ return function ( args ) {
263263
partitioned = partition( commands, maxSize ),
264264

265265
valid = /^(\d+|$)/.test( args.content ),
266-
page = Number( args.content ) || 0;
266+
page = (Number( args.content ) - 1) || 0;
267267

268-
if ( page > partitioned.length || !valid ) {
268+
if ( page >= partitioned.length || !valid ) {
269269
return args.codify( [
270270
'StackOverflow: Could not access page.',
271271
'IndexError: index out of range',

0 commit comments

Comments
 (0)