Skip to content

Commit 363f0af

Browse files
author
Sophia Marie Terry
committed
CLOUDP-328985: Fix for removePrefix
1 parent 17bcc0f commit 363f0af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/spectral/ipa/rulesets/functions/utils/resourceEvaluation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@ function resourceBelongsToSingleParent(resourcePath) {
190190
}
191191

192192
// TODO move prefixes to be rule arguments
193-
function removePrefix(path) {
194-
if (path.startsWith(AUTH_PREFIX)) {
195-
return path.slice(AUTH_PREFIX.length);
196-
}
193+
export function removePrefix(path) {
197194
if (path.startsWith(UNAUTH_PREFIX)) {
198195
return path.slice(UNAUTH_PREFIX.length);
199196
}
197+
if (path.startsWith(AUTH_PREFIX)) {
198+
return path.slice(AUTH_PREFIX.length);
199+
}
200200
return path;
201201
}

0 commit comments

Comments
 (0)