Skip to content

Commit

Permalink
fix: 🐛 Non-node proxy checking
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Dec 16, 2021
1 parent 66d4aa3 commit d9fc78c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
4 changes: 1 addition & 3 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
'use strict';

var require$$0 = require('obsidian');
var util = require('util');
var console$1 = require('console');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
var util__default = /*#__PURE__*/_interopDefaultLegacy(util);

var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

Expand Down Expand Up @@ -52053,7 +52051,7 @@ class BCPlugin extends require$$0.Plugin {
const queue = [item];
while (queue.length) {
const currItem = queue.shift();
if (util__default['default'].types.isProxy(currItem)) {
if (typeof currItem.defaultComparator === "function") {
const possibleUnproxied = Object.assign({}, currItem);
const { values } = possibleUnproxied;
if (values)
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
"hierarchy-js": "^1.0.4",
"juggl-api": "git+https://github.com/HEmile/juggl-api.git",
"loglevel": "^1.8.0",
"nodejs": "^0.0.0",
"obsidian-community-lib": "^1.2.0",
"svelte": "3.35.0",
"svelte-icons": "^2.1.0"
}
}
}
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
waitForResolvedLinks,
} from "obsidian-community-lib/dist/utils";
import { Debugger } from "src/Debugger";
import util from "util";
import { BCSettingTab } from "./BreadcrumbsSettingTab";
import NextPrev from "./Components/NextPrev.svelte";
import TrailGrid from "./Components/TrailGrid.svelte";
Expand Down Expand Up @@ -688,7 +687,7 @@ export default class BCPlugin extends Plugin {
const queue = [item];
while (queue.length) {
const currItem = queue.shift();
if (util.types.isProxy(currItem)) {
if (typeof currItem.defaultComparator === "function") {
const possibleUnproxied = Object.assign({}, currItem);
const { values } = possibleUnproxied;
if (values) queue.push(...values);
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2302,11 +2302,6 @@
"resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
"version" "1.0.0"

"[email protected]":
"integrity" "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
"resolved" "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz"
"version" "0.0.1-security"

"function-bind@^1.1.1":
"integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
"resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
Expand Down Expand Up @@ -3289,11 +3284,6 @@
"resolved" "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz"
"version" "2.6.1"

"nodejs@^0.0.0":
"integrity" "sha1-RyL6LhisTrc6Qq4W0B41hKErdTE="
"resolved" "https://registry.npmjs.org/nodejs/-/nodejs-0.0.0.tgz"
"version" "0.0.0"

"nopt@^4.0.1":
"integrity" "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg=="
"resolved" "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz"
Expand Down

0 comments on commit d9fc78c

Please sign in to comment.