chayns-api 2.4.19 → 2.4.20
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.
|
@@ -9,9 +9,9 @@ let current = undefined;
|
|
|
9
9
|
const moduleWrapper = exports.moduleWrapper = {
|
|
10
10
|
get current() {
|
|
11
11
|
if (moduleWrapperStack.length === 0 && !current) {
|
|
12
|
-
throw new Error("No chayns api instance
|
|
12
|
+
throw new Error("No chayns api instance initialized");
|
|
13
13
|
}
|
|
14
|
-
return moduleWrapperStack.
|
|
14
|
+
return moduleWrapperStack.length > 0 ? moduleWrapperStack[moduleWrapperStack.length - 1] : current;
|
|
15
15
|
},
|
|
16
16
|
set current(chayns) {
|
|
17
17
|
current = chayns;
|
|
@@ -3,9 +3,9 @@ let current = undefined;
|
|
|
3
3
|
export const moduleWrapper = {
|
|
4
4
|
get current() {
|
|
5
5
|
if (moduleWrapperStack.length === 0 && !current) {
|
|
6
|
-
throw new Error("No chayns api instance
|
|
6
|
+
throw new Error("No chayns api instance initialized");
|
|
7
7
|
}
|
|
8
|
-
return moduleWrapperStack.
|
|
8
|
+
return moduleWrapperStack.length > 0 ? moduleWrapperStack[moduleWrapperStack.length - 1] : current;
|
|
9
9
|
},
|
|
10
10
|
set current(chayns) {
|
|
11
11
|
current = chayns;
|