mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Enable strict TypeScript settings
This commit is contained in:
@@ -39,8 +39,8 @@ export class SimpleSparqlUpdatePatchHandler extends PatchHandler {
|
||||
}
|
||||
|
||||
const def = defaultGraph();
|
||||
const deletes = op.delete || [];
|
||||
const inserts = op.insert || [];
|
||||
const deletes = op.delete ?? [];
|
||||
const inserts = op.insert ?? [];
|
||||
|
||||
if (!deletes.every((pattern): boolean => pattern.graph.equals(def))) {
|
||||
throw new UnsupportedHttpError('GRAPH statements are not supported.');
|
||||
@@ -48,7 +48,7 @@ export class SimpleSparqlUpdatePatchHandler extends PatchHandler {
|
||||
if (!inserts.every((pattern): boolean => pattern.graph.equals(def))) {
|
||||
throw new UnsupportedHttpError('GRAPH statements are not supported.');
|
||||
}
|
||||
if (op.where || deletes.some((pattern): boolean => someTerms(pattern, (term): boolean => term.termType === 'Variable'))) {
|
||||
if (op.where ?? deletes.some((pattern): boolean => someTerms(pattern, (term): boolean => term.termType === 'Variable'))) {
|
||||
throw new UnsupportedHttpError('WHERE statements are not supported.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user