Skip to content

Commit 795b286

Browse files
speed up this check
1 parent ada293f commit 795b286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/JSON/Schema/Modern.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ sub traverse ($self, $schema_reference, $config_override = {}) {
290290
croak 'initial_schema_uri fragment must be a json pointer' if $uri_path !~ m{^/};
291291

292292
croak 'traversed_schema_path does not match initial_schema_uri path fragment'
293-
if $initial_path !~ m{\Q$uri_path\E$};
293+
if substr($initial_path, -length($uri_path)) ne $uri_path;
294294
}
295295

296296
my $state = {

0 commit comments

Comments
 (0)