mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
pluginfw: Return from findUnmet()
early if not given an object
For some reason strings are sometimes passed to `findUnmet()`, which is obviously unexpected given the way the code is written. Rather than figure out why strings are passed and how to safely avoid passing strings, just return early. The net effect is the same, but returning early avoids setting a property on a string, which is prohibited in strict mode.
This commit is contained in:
parent
a06662fd00
commit
895764e047
1 changed files with 1 additions and 0 deletions
|
@ -250,6 +250,7 @@ function resolveInheritance(obj) {
|
|||
// No I/O
|
||||
const fuSeen = [];
|
||||
function findUnmet(obj) {
|
||||
if (typeof obj !== 'object') return;
|
||||
if (fuSeen.indexOf(obj) !== -1) return;
|
||||
fuSeen.push(obj);
|
||||
const deps = obj.dependencies = obj.dependencies || {};
|
||||
|
|
Loading…
Reference in a new issue