Fix notice thrown when the index query is undefined
Merge pull request #3 from Tape/fix-notice

Fix notice thrown when the index query is undefined