Skip to content

Commit

Permalink
KISS: Don't validate length
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm committed Oct 28, 2024
1 parent 705d1e7 commit 01e49aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/protoplugin/src/parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function parseParameter<T extends object>(
break;
case "rewrite_imports": {
const i = value.indexOf(":");
if (i <= 0) {
if (i < 0) {
throw new PluginOptionError(
raw,
"must be in the form of <pattern>:<target>",
Expand Down

0 comments on commit 01e49aa

Please sign in to comment.