Skip to content

Commit

Permalink
remove unnecessary object spreading in quad constructor of model-data…
Browse files Browse the repository at this point in the history
…-factory
  • Loading branch information
elpoelma committed Jun 17, 2024
1 parent 53f6f59 commit f5be2c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions addon/utils/_private/rdfa-parser/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ import type {
ModelTerm,
} from '@lblod/ember-rdfa-editor/utils/_private/rdfa-parser/rdfa-parser';

export class ModelDataFactory<N> extends DataFactory {
export class ModelDataFactory<N> extends DataFactory<ModelQuad<N>> {
quad(
subject: ModelQuadSubject<N>,
predicate: ModelQuadPredicate<N>,
object: ModelQuadObject<N>,
graph: RDF.Quad_Graph,
): ModelQuad<N> {
const quad = super.quad(subject, predicate, object, graph);
return { ...quad, subject, predicate, object, graph };
return super.quad(subject, predicate, object, graph);
}

namedNode<N, I extends string = string>(
Expand Down

0 comments on commit f5be2c5

Please sign in to comment.