-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wikidata] Fix ISNI crashing and WP parsing (#103)
Crash bugs (2) reported and pin-pointed by DenizC and diskotechjam in https://community.metabrainz.org/t/user-script-to-load-artist-data-from-wikipedia/86338/38?u=jesus2099 --- - WD is Wikidata - WP is Wikipedia --- fillISNI function crash ----------------------- > Uncaught TypeError: Cannot read properties of undefined (reading 'parentElement') `edit-artist.isni_codes-template` no longer exists in react version of artist edit page. fillFormFromISNI function crash ------------------------------- > Uncaught TypeError: Cannot read properties of null (reading 'length') When regex does not match, it is `null`. Fill ISNI code from WD ---------------------- This does not work on the new react version of the artist edit page. Reported by @zas Fetch WD page from WP URL ------------------------- It does no longer find WD page from WP URL. Probably WP pages have changed. Reported by diskotechjam --- Bonus: Use only UTC time functions everywhere, for consistency
- Loading branch information
Showing
1 changed file
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters