Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
Venryx committed Dec 1, 2020
1 parent 7d5295e commit d2b5a30
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Dist/Hooks/Object_scanLocalFoldersFailed.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// fixes that failure to load a file in local-library, would cause scanning to fail
// Fixes that failure to load a file in local-library, would cause an error in the renderer (when notified of the scanning error).
// This doesn't actually solve the source error, but makes the error-reporting a bit nicer.
function AddHook_Object_scanLocalFoldersFailed() {
Object.defineProperty(Object.prototype, "scanLocalFoldersFailed", {
enumerable: false,
Expand Down
5 changes: 3 additions & 2 deletions Dist/Start.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const react_dom_1 = __importDefault(require("react-dom"));
const Root_1 = require("./UI/Root");
const FromJSVE_1 = require("./Utils/General/FromJSVE");
const React_CreateElement_1 = require("./Hooks/React_CreateElement");
const Object_scanLocalFoldersFailed_1 = require("./Hooks/Object_scanLocalFoldersFailed");
function Start(api, rootPath, require_app) {
// if there was a previous launch of this plugin, unload that launch before this one starts
if (window["vplugin_unloadLastLaunch"]) {
Expand All @@ -21,7 +22,7 @@ function Start(api, rootPath, require_app) {
//AddHook_Store_ReactReduxGrid(api);
//AddHook_React_CreateElement(require_app);
React_CreateElement_1.AddHook_React_CreateElement(api.React);
//AddHook_Object_scanLocalFoldersFailed();
Object_scanLocalFoldersFailed_1.AddHook_Object_scanLocalFoldersFailed();
mountNodeParentFinder.Start();
//console.log("Test1:" + require("react-redux"));
//console.log("Test2:", __webpack_require__);
Expand All @@ -33,7 +34,7 @@ exports.Start = Start;
function Unload() {
//RemoveHook_Store_ReactReduxGrid();
React_CreateElement_1.RemoveHook_React_CreateElement();
//RemoveHook_Object_scanLocalFoldersFailed();
Object_scanLocalFoldersFailed_1.RemoveHook_Object_scanLocalFoldersFailed();
mountNode.remove();
}
exports.Unload = Unload;
Expand Down
3 changes: 2 additions & 1 deletion Source/Hooks/Object_scanLocalFoldersFailed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// fixes that failure to load a file in local-library, would cause scanning to fail
// Fixes that failure to load a file in local-library, would cause an error in the renderer (when notified of the scanning error).
// This doesn't actually solve the source error, but makes the error-reporting a bit nicer.
export function AddHook_Object_scanLocalFoldersFailed() {
Object.defineProperty(Object.prototype, "scanLocalFoldersFailed", {
enumerable: false,
Expand Down
4 changes: 2 additions & 2 deletions Source/Start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function Start(api, rootPath: string, require_app: (path: string)=>any) {
//AddHook_Store_ReactReduxGrid(api);
//AddHook_React_CreateElement(require_app);
AddHook_React_CreateElement(api.React);
//AddHook_Object_scanLocalFoldersFailed();
AddHook_Object_scanLocalFoldersFailed();
mountNodeParentFinder.Start();

//console.log("Test1:" + require("react-redux"));
Expand All @@ -38,7 +38,7 @@ export function Start(api, rootPath: string, require_app: (path: string)=>any) {
export function Unload() {
//RemoveHook_Store_ReactReduxGrid();
RemoveHook_React_CreateElement();
//RemoveHook_Object_scanLocalFoldersFailed();
RemoveHook_Object_scanLocalFoldersFailed();
mountNode.remove();
}

Expand Down

0 comments on commit d2b5a30

Please sign in to comment.