heiseonline / shariff

👮 Shariff enables website users to share their favorite content without compromising their privacy.
http://ct.de/-2467514
MIT License
1.4k stars 177 forks source link

Uncaught TypeError: Cannot read property 'title' of undefined #358

Closed rmader closed 5 years ago

rmader commented 5 years ago

Hello, after updating a big project of ours, we now get the following error when using shariff:

Uncaught TypeError: Cannot read property 'title' of undefined
    at s.getTitle (shariff.js:160)

Here is the concerned code part:

  getTitle() {
    let title = this.getOption('title')
    if ($(this.element).data()['title']) return title   <---------
    title = title || this.getMeta('DC.title')
    let creator = this.getMeta('DC.creator')
    return (title && creator) ? `${title} - ${creator}` : title
  }

Could this be a bug in shariff or is something with our config just wrong (probably something about jquery)?

casdidier commented 3 years ago

hello @rmader, I m facing the same issue. How did you solve this ?