Skip to content

Commit

Permalink
fix(initQueryData.js): unexpected exception in debug mode
Browse files Browse the repository at this point in the history
TypeError: mw.Api is not a constructor
  • Loading branch information
AnYiEE committed Jan 5, 2024
1 parent 6f69d06 commit cb033aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/method/initQueryData.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const mwApi = new mw.Api({
parameters: {
format: 'json',
formatversion: 2,
},
})
import { mwApi } from '../utils/mw'

export async function initQueryData() {
// Init
Expand Down
2 changes: 1 addition & 1 deletion src/module/articleLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function articleLink(elements) {
class: 'in-page-edit-article-link',
text: _msg('quick-edit'),
}).on('click', function (event) {
event.preventDefault();
event.preventDefault()
var options = {}
options.page = title
if (revision !== null) {
Expand Down

0 comments on commit cb033aa

Please sign in to comment.