Skip to content

Commit

Permalink
Remove unnecessary throw
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Feb 3, 2024
1 parent b4404b3 commit 551b5f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ exports.ClassicLevel = ClassicLevel
const encodingEnum = function (encoding) {
if (encoding === 'buffer') return 0
if (encoding === 'utf8') return 1
if (encoding === 'view') return 2

throw new Error(`Unknown encoding: ${encoding}`)
/* istanbul ignore else: should not happen */
if (encoding === 'view') return 2
}

0 comments on commit 551b5f7

Please sign in to comment.