@zenflux/react-commander 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/package.json",
|
|
3
3
|
"name": "@zenflux/react-commander",
|
|
4
4
|
"author": "Leonid Vinikov <leonidvinikov@gmail.com> (https://github.com/iNewLegend)",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.10",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"types": "src/index.ts",
|
package/src/commands-manager.ts
CHANGED
|
@@ -180,8 +180,8 @@ class CommandsManager {
|
|
|
180
180
|
throw new Error( `Component '${ componentName }' not registered` );
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
//
|
|
184
|
-
const shouldSilentError = !!
|
|
183
|
+
// If HMR is active, suppress errors for missing contexts during hot reload
|
|
184
|
+
const shouldSilentError = !! import.meta.hot;
|
|
185
185
|
|
|
186
186
|
const singleComponentContext = core[ GET_INTERNAL_SYMBOL ]( componentNameUnique, shouldSilentError ) as DCommandSingleComponentContext;
|
|
187
187
|
|
|
@@ -47,7 +47,7 @@ export function useCommand( commandName: string, ref?: React.RefObject<any> ) {
|
|
|
47
47
|
const debug = ( ..._args: Array<unknown> ) => {
|
|
48
48
|
try {
|
|
49
49
|
// TODO: Enable when needed
|
|
50
|
-
console.debug( "[react-commander/useCommand]", ..._args );
|
|
50
|
+
// console.debug( "[react-commander/useCommand]", ..._args );
|
|
51
51
|
} catch {}
|
|
52
52
|
};
|
|
53
53
|
|