Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Nov 29, 2024
1 parent eed3599 commit 948f573
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func isLocalLocator(locator string) bool {

func shouldBlockAbsoluteLocatorBecauseIsInTheSameSourceModuleLocatorPackage(relativeOrAbsoluteLocator string, sourceModuleLocator string, rootPackageId string) bool {
// Make sure the root package id ends with a trailing slash.
rootPackageId = strings.TrimPrefix(rootPackageId, "/") + "/"
rootPackageId = strings.TrimSuffix(rootPackageId, "/") + "/"
isSourceModuleInRootPackage := strings.HasPrefix(sourceModuleLocator, rootPackageId)
isAbsoluteLocatorInRootPackage := strings.HasPrefix(relativeOrAbsoluteLocator, rootPackageId)
return isSourceModuleInRootPackage && isAbsoluteLocatorInRootPackage
Expand Down

0 comments on commit 948f573

Please sign in to comment.