Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard Pane: label crashes when the subject is not a NamedNode #227

Open
timbl opened this issue Mar 17, 2020 · 1 comment
Open

Dashboard Pane: label crashes when the subject is not a NamedNode #227

timbl opened this issue Mar 17, 2020 · 1 comment
Labels

Comments

@timbl
Copy link
Contributor

timbl commented Mar 17, 2020

Console log

Uncaught (in promise) TypeError: subject.site is not a function
    at Object.label (mashlib.js:62753)
    at mashlib.js:65309
    at Array.filter (<anonymous>)
    at _callee6$ (mashlib.js:65308)
    at tryCatch (mashlib.js:120589)
    at Generator.invoke [as _invoke] (mashlib.js:120815)
    at Generator.prototype.<computed> [as next] (mashlib.js:120641)
    at asyncGeneratorStep (mashlib.js:64629)
    at _next (mashlib.js:64651)
    at mashlib.js:64658

eg when subject is https://webschemas.org/SpecialAnnouncement

in the code:

  name: 'dashboard',
  label: function label(subject) {
    if (subject.uri === subject.site().uri) {
      return 'Dashboard';
    }

@timbl timbl changed the title Dashboard Pane: label crashes when you expand the URI field in internals pane Dashboard Pane: label crashes when the subject is not a NamedNode Mar 17, 2020
@timbl
Copy link
Contributor Author

timbl commented Mar 17, 2020

eg you expand the URI field in internals pan, then the subject is a literal? In principle could be blane node I guess too.

@timbl timbl added the bug label Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant