mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
pluginfw: Fix state reset logic
This commit is contained in:
parent
895764e047
commit
9a86ebec2a
1 changed files with 3 additions and 2 deletions
|
@ -96,6 +96,8 @@ const asyncMap = require('slide').asyncMap;
|
||||||
const semver = require('semver');
|
const semver = require('semver');
|
||||||
const log = require('log4js').getLogger('pluginfw');
|
const log = require('log4js').getLogger('pluginfw');
|
||||||
|
|
||||||
|
let fuSeen = [];
|
||||||
|
|
||||||
function readJson(file, callback) {
|
function readJson(file, callback) {
|
||||||
fs.readFile(file, (er, buf) => {
|
fs.readFile(file, (er, buf) => {
|
||||||
if (er) {
|
if (er) {
|
||||||
|
@ -115,9 +117,9 @@ module.exports = readInstalled;
|
||||||
function readInstalled(folder, cb) {
|
function readInstalled(folder, cb) {
|
||||||
/* This is where we clear the cache, these three lines are all the
|
/* This is where we clear the cache, these three lines are all the
|
||||||
* new code there is */
|
* new code there is */
|
||||||
|
fuSeen = [];
|
||||||
rpSeen = {};
|
rpSeen = {};
|
||||||
riSeen = [];
|
riSeen = [];
|
||||||
const fuSeen = [];
|
|
||||||
|
|
||||||
const d = npm.config.get('depth');
|
const d = npm.config.get('depth');
|
||||||
readInstalled_(folder, null, null, null, 0, d, (er, obj) => {
|
readInstalled_(folder, null, null, null, 0, d, (er, obj) => {
|
||||||
|
@ -248,7 +250,6 @@ function resolveInheritance(obj) {
|
||||||
|
|
||||||
// find unmet deps by walking up the tree object.
|
// find unmet deps by walking up the tree object.
|
||||||
// No I/O
|
// No I/O
|
||||||
const fuSeen = [];
|
|
||||||
function findUnmet(obj) {
|
function findUnmet(obj) {
|
||||||
if (typeof obj !== 'object') return;
|
if (typeof obj !== 'object') return;
|
||||||
if (fuSeen.indexOf(obj) !== -1) return;
|
if (fuSeen.indexOf(obj) !== -1) return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue