Skip to content

Commit c3c1b00

Browse files
committed
feat: simplify method check in NgHttpCachingService by using includes instead of indexOf
1 parent 4fea63b commit c3c1b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/ng-http-caching/src/lib/ng-http-caching.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ export class NgHttpCachingService {
459459
}
460460
}
461461
// request is allowed if method is in allowedMethod
462-
return this.config.allowedMethod.indexOf(req.method) !== -1;
462+
return this.config.allowedMethod.includes(req.method);
463463
}
464464

465465
/**

0 commit comments

Comments
 (0)