Skip to content

Commit

Permalink
fix #324 Displaying "This submission may contain copyright violations…
Browse files Browse the repository at this point in the history
…" is broken

Was comparing string to int. One fix is to change `===` to `==`
  • Loading branch information
NovemLinguae committed Apr 10, 2024
1 parent 797075e commit 05f4404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@
page_id: mw.config.get( 'wgArticleId' )
} ).then( function ( json ) {
var triageInfo = json.pagetriagelist.pages[ 0 ];
if ( triageInfo && triageInfo.copyvio === mw.config.get( 'wgCurRevisionId' ) ) {
if ( triageInfo && triageInfo.copyvio == mw.config.get( 'wgCurRevisionId' ) ) {
addWarning( 'This submission may contain copyright violations', 'CopyPatrol', function () {
window.open( 'https://copypatrol.wmcloud.org/en?filter=all&searchCriteria=page_exact&searchText=' +
encodeURIComponent( afchPage.rawTitle ) + '&drafts=1&revision=' +
Expand Down

0 comments on commit 05f4404

Please sign in to comment.