fix installation issue

VM446:9 Uncaught TypeError: Cannot read property 'Info' of undefined
    at <anonymous>:9:31
    at <anonymous>:235:3
    at Proxy.createElementInHead (index.html:1)
    at index.html:1
    at async Promise.all (index 1)

Referring to [line 9](f027b75268/docs/plugins/haveibeenpwned/plugin.js (L9))
This commit is contained in:
ReturnEnd 2019-12-12 00:27:40 +01:00 committed by GitHub
parent f027b75268
commit f34132bda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -4,15 +4,15 @@
* @license MIT
*/
const Logger = require('util/logger');
const Logger = require('util/logger').Logger;
// change log level here.
const LogLevel = Logger.Level.Info;
const DetailsView = require('views/details/details-view');
const InputFx = require('util/input-fx');
const DetailsView = require('views/details/details-view').DetailsView;
const InputFx = require('util/ui/input-fx').InputFx;
const Kdbxweb = require('kdbxweb');
const _ = require('_');
const Tip = require('util/tip');
const utilFn = require('util/fn');
const Tip = require('util/ui/tip').Tip;
const detailsViewFieldChanged = DetailsView.prototype.fieldChanged;
let _seen = [];
@ -142,7 +142,7 @@ DetailsView.prototype.checkNamePwned = function (name) {
if (data && data.length > 0) {
hibp.logger.debug('found breaches ' + JSON.stringify(data));
let breaches = '';
data.forEach(breach => { breaches += '<li>' + _.escape(breach.Name) + '</li>\n'; });
data.forEach(breach => { breaches += '<li>' + utilFn.escape(breach.Name) + '</li>\n'; });
hibp.alert(this.userEditView.$el, `WARNING! This account has been pawned in the following breaches<br/>\n<ul>\n${breaches}\n</ul>\n<p>Please check on <a href='https://haveibeenpwned.com'>https://haveibeenpwned.com</a>\n`);
} else {
hibp.passed(this.userEditView.$el, 'check pwned user name passed...');
@ -168,7 +168,7 @@ DetailsView.prototype.checkPwdPwned = function (passwordHash) {
const h = line.split(':');
const suffix = h[0];
if (prefix + suffix === passwordHash) {
const nb = _.escape(h[1]);
const nb = utilFn.escape(h[1]);
hibp.alert(this.passEditView.$el, `WARNING: This password is referenced as pawned ${nb} times on <a href='https://haveibeenpwned.com'>https://haveibeenpwned.com</a>!\n`);
}
});