Skip to content

Commit

Permalink
fix: endpoints initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Oct 25, 2024
1 parent ce0408f commit 672bc5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sparql-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class SparqlEditor extends HTMLElement {
this.endpoints = (this.getAttribute("endpoint") || "").split(",").map(e => e.trim());
// NOTE: will need to be removed at some point I guess
// Check if examples contain the index field, if not reset cache
if (this.currentEndpoint().examples?.some(example => example.index === undefined)) {
if (this.currentEndpoint() && this.currentEndpoint().examples?.some(example => example.index === undefined)) {
localStorage.removeItem("sparql-editor-metadata");
this.meta = {};
}
Expand Down

0 comments on commit 672bc5b

Please sign in to comment.