diff --git a/src/features/bars/bar.ts b/src/features/bars/bar.ts
index 1eca337..a77fcb8 100644
--- a/src/features/bars/bar.ts
+++ b/src/features/bars/bar.ts
@@ -1,5 +1,11 @@
import BarComponent from "features/bars/Bar.vue";
-import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
+import type {
+ CoercableComponent,
+ GenericComponent,
+ OptionsFunc,
+ Replace,
+ StyleValue
+} from "features/feature";
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
import type { DecimalSource } from "util/bignum";
import { Direction } from "util/common";
diff --git a/src/features/boards/Board.vue b/src/features/boards/Board.vue
index c7e7d9d..221ed4a 100644
--- a/src/features/boards/Board.vue
+++ b/src/features/boards/Board.vue
@@ -210,7 +210,7 @@ function drag(e: MouseEvent | TouchEvent) {
hasDragged.value = true;
}
- if (dragging.value) {
+ if (dragging.value != null) {
e.preventDefault();
e.stopPropagation();
}
diff --git a/src/features/boards/BoardNode.vue b/src/features/boards/BoardNode.vue
index e46fb32..a153afd 100644
--- a/src/features/boards/BoardNode.vue
+++ b/src/features/boards/BoardNode.vue
@@ -234,17 +234,17 @@ const title = computed(() => getNodeProperty(props.nodeType.value.title, unref(p
const label = computed(() => getNodeProperty(props.nodeType.value.label, unref(props.node)));
const size = computed(() => getNodeProperty(props.nodeType.value.size, unref(props.node)));
const progress = computed(
- () => getNodeProperty(props.nodeType.value.progress, unref(props.node)) || 0
+ () => getNodeProperty(props.nodeType.value.progress, unref(props.node)) ?? 0
);
const backgroundColor = computed(() => themes[settings.theme].variables["--background"]);
const outlineColor = computed(
() =>
- getNodeProperty(props.nodeType.value.outlineColor, unref(props.node)) ||
+ getNodeProperty(props.nodeType.value.outlineColor, unref(props.node)) ??
themes[settings.theme].variables["--outline"]
);
const fillColor = computed(
() =>
- getNodeProperty(props.nodeType.value.fillColor, unref(props.node)) ||
+ getNodeProperty(props.nodeType.value.fillColor, unref(props.node)) ??
themes[settings.theme].variables["--raised-background"]
);
const progressColor = computed(() =>
@@ -252,7 +252,7 @@ const progressColor = computed(() =>
);
const titleColor = computed(
() =>
- getNodeProperty(props.nodeType.value.titleColor, unref(props.node)) ||
+ getNodeProperty(props.nodeType.value.titleColor, unref(props.node)) ??
themes[settings.theme].variables["--foreground"]
);
const progressDisplay = computed(() =>
diff --git a/src/features/buyable.tsx b/src/features/buyable.tsx
index b3d3737..c426274 100644
--- a/src/features/buyable.tsx
+++ b/src/features/buyable.tsx
@@ -1,5 +1,11 @@
import ClickableComponent from "features/clickables/Clickable.vue";
-import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
+import type {
+ CoercableComponent,
+ GenericComponent,
+ OptionsFunc,
+ Replace,
+ StyleValue
+} from "features/feature";
import { Component, GatherProps, getUniqueID, jsx, setDefault, Visibility } from "features/feature";
import type { Resource } from "features/resources/resource";
import { DefaultValue, Persistent } from "game/persistence";
@@ -170,18 +176,18 @@ export function createBuyable
(
}
if (currDisplay != null && buyable.cost != null && buyable.resource != null) {
const genericBuyable = buyable as GenericBuyable;
- const Title = coerceComponent(currDisplay.title || "", "h3");
- const Description = coerceComponent(currDisplay.description || "");
- const EffectDisplay = coerceComponent(currDisplay.effectDisplay || "");
+ const Title = coerceComponent(currDisplay.title ?? "", "h3");
+ const Description = coerceComponent(currDisplay.description ?? "");
+ const EffectDisplay = coerceComponent(currDisplay.effectDisplay ?? "");
return (
- {currDisplay.title ? (
+ {currDisplay.title == null ? null : (
- ) : null}
- {currDisplay.description ? : null}
+ )}
+ {currDisplay.description == null ? null : }
{currDisplay.showAmount === false ? null : (
@@ -195,15 +201,15 @@ export function createBuyable(
)}
)}
- {currDisplay.effectDisplay ? (
+ {currDisplay.effectDisplay == null ? null : (
Currently:
- ) : null}
- {genericBuyable.cost && !genericBuyable.maxed.value ? (
+ )}
+ {genericBuyable.cost != null && !genericBuyable.maxed.value ? (
- Cost: {format(unref(genericBuyable.cost) || 0)}{" "}
+ Cost: {format(unref(genericBuyable.cost))}{" "}
{buyable.resource.displayName}
) : null}
diff --git a/src/features/challenges/Challenge.vue b/src/features/challenges/Challenge.vue
index e387c18..f68d9cf 100644
--- a/src/features/challenges/Challenge.vue
+++ b/src/features/challenges/Challenge.vue
@@ -134,25 +134,25 @@ export default defineComponent({
comp.value = coerceComponent(
jsx(() => (
- {currDisplay.title ? (
+ {currDisplay.title != null ? (
) : null}
- {currDisplay.goal ? (
+ {currDisplay.goal != null ? (
Goal:
) : null}
- {currDisplay.reward ? (
+ {currDisplay.reward != null ? (
Reward:
) : null}
- {currDisplay.effectDisplay ? (
+ {currDisplay.effectDisplay != null ? (
Currently:
diff --git a/src/features/challenges/challenge.tsx b/src/features/challenges/challenge.tsx
index 8128ab2..be3d90b 100644
--- a/src/features/challenges/challenge.tsx
+++ b/src/features/challenges/challenge.tsx
@@ -126,7 +126,10 @@ export function createChallenge(
challenge.toggle = function () {
const genericChallenge = challenge as GenericChallenge;
if (genericChallenge.active.value) {
- if (unref(genericChallenge.canComplete) && !genericChallenge.maxed.value) {
+ if (
+ unref(genericChallenge.canComplete) !== false &&
+ !genericChallenge.maxed.value
+ ) {
let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);
if (typeof completions === "boolean") {
completions = 1;
@@ -264,11 +267,14 @@ export function setupAutoComplete(
exitOnComplete = true
): WatchStopHandle {
const isActive = typeof autoActive === "function" ? computed(autoActive) : autoActive;
- return watch([challenge.canComplete, isActive], ([canComplete, isActive]) => {
- if (canComplete && isActive) {
- challenge.complete(!exitOnComplete);
+ return watch(
+ [challenge.canComplete as Ref, isActive as Ref],
+ ([canComplete, isActive]) => {
+ if (canComplete && isActive) {
+ challenge.complete(!exitOnComplete);
+ }
}
- });
+ );
}
export function createActiveChallenge(
diff --git a/src/features/clickables/Clickable.vue b/src/features/clickables/Clickable.vue
index acbc804..c51c510 100644
--- a/src/features/clickables/Clickable.vue
+++ b/src/features/clickables/Clickable.vue
@@ -98,7 +98,7 @@ export default defineComponent({
comp.value = coerceComponent(
jsx(() => (
- {currDisplay.title ? (
+ {currDisplay.title != null ? (
diff --git a/src/features/clickables/clickable.ts b/src/features/clickables/clickable.ts
index 7222982..68035c4 100644
--- a/src/features/clickables/clickable.ts
+++ b/src/features/clickables/clickable.ts
@@ -1,5 +1,11 @@
import ClickableComponent from "features/clickables/Clickable.vue";
-import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
+import type {
+ CoercableComponent,
+ GenericComponent,
+ OptionsFunc,
+ Replace,
+ StyleValue
+} from "features/feature";
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
import type { BaseLayer } from "game/layers";
import type { Unsubscribe } from "nanoevents";
@@ -84,7 +90,7 @@ export function createClickable(
if (clickable.onClick) {
const onClick = clickable.onClick.bind(clickable);
clickable.onClick = function (e) {
- if (unref(clickable.canClick)) {
+ if (unref(clickable.canClick) !== false) {
onClick(e);
}
};
@@ -92,7 +98,7 @@ export function createClickable(
if (clickable.onHold) {
const onHold = clickable.onHold.bind(clickable);
clickable.onHold = function () {
- if (unref(clickable.canClick)) {
+ if (unref(clickable.canClick) !== false) {
onHold();
}
};
@@ -136,7 +142,8 @@ export function setupAutoClick(
clickable: GenericClickable,
autoActive: Computable = true
): Unsubscribe {
- const isActive = typeof autoActive === "function" ? computed(autoActive) : autoActive;
+ const isActive: ProcessedComputable =
+ typeof autoActive === "function" ? computed(autoActive) : autoActive;
return layer.on("update", () => {
if (unref(isActive) && unref(clickable.canClick)) {
clickable.onClick?.();
diff --git a/src/features/conversion.ts b/src/features/conversion.ts
index 6c95c1e..a7f18d0 100644
--- a/src/features/conversion.ts
+++ b/src/features/conversion.ts
@@ -151,7 +151,7 @@ export function createConversion(
: conversion.scaling.currentGain(conversion as GenericConversion);
gain = Decimal.floor(gain).max(0);
- if (!unref(conversion.buyMax)) {
+ if (unref(conversion.buyMax) === false) {
gain = gain.min(1);
}
return gain;
@@ -163,14 +163,15 @@ export function createConversion(
if (conversion.currentAt == null) {
conversion.currentAt = computed(() => {
let current = conversion.scaling.currentAt(conversion as GenericConversion);
- if (conversion.roundUpCost) current = Decimal.ceil(current);
+ if (unref((conversion as GenericConversion).roundUpCost))
+ current = Decimal.ceil(current);
return current;
});
}
if (conversion.nextAt == null) {
conversion.nextAt = computed(() => {
let next = conversion.scaling.nextAt(conversion as GenericConversion);
- if (conversion.roundUpCost) next = Decimal.ceil(next);
+ if (unref((conversion as GenericConversion).roundUpCost)) next = Decimal.ceil(next);
return next;
});
}
@@ -405,7 +406,7 @@ export function createIndependentConversion(
: conversion.scaling.currentGain(conversion as GenericConversion);
gain = Decimal.floor(gain).max(conversion.gainResource.value);
- if (!unref(conversion.buyMax)) {
+ if (unref(conversion.buyMax) === false) {
gain = gain.min(Decimal.add(conversion.gainResource.value, 1));
}
return gain;
@@ -418,7 +419,7 @@ export function createIndependentConversion(
conversion.gainResource.value
).max(0);
- if (!unref(conversion.buyMax)) {
+ if (unref(conversion.buyMax) === false) {
gain = gain.min(1);
}
return gain;
@@ -511,8 +512,10 @@ export function addSoftcap(
): ScalingFunction {
return {
...scaling,
- currentAt: conversion => softcap(scaling.currentAt(conversion), unref(cap), Decimal.recip(unref(power))),
- nextAt: conversion => softcap(scaling.nextAt(conversion), unref(cap), Decimal.recip(unref(power))),
+ currentAt: conversion =>
+ softcap(scaling.currentAt(conversion), unref(cap), Decimal.recip(unref(power))),
+ nextAt: conversion =>
+ softcap(scaling.nextAt(conversion), unref(cap), Decimal.recip(unref(power))),
currentGain: conversion =>
softcap(scaling.currentGain(conversion), unref(cap), unref(power))
};
diff --git a/src/features/feature.ts b/src/features/feature.ts
index ae14e29..afa251f 100644
--- a/src/features/feature.ts
+++ b/src/features/feature.ts
@@ -102,7 +102,7 @@ export function findFeatures(obj: Record, ...types: symbol[]):
const handleObject = (obj: Record) => {
Object.keys(obj).forEach(key => {
const value = obj[key];
- if (value && typeof value === "object") {
+ if (value != null && typeof value === "object") {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (types.includes((value as Record).type)) {
objects.push(value);
@@ -127,7 +127,7 @@ export function excludeFeatures(obj: Record, ...types: symbol[]
const handleObject = (obj: Record) => {
Object.keys(obj).forEach(key => {
const value = obj[key];
- if (value && typeof value === "object") {
+ if (value != null && typeof value === "object") {
if (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
typeof (value as Record).type == "symbol" &&
diff --git a/src/features/milestones/Milestone.vue b/src/features/milestones/Milestone.vue
index 92a90d6..8cc4331 100644
--- a/src/features/milestones/Milestone.vue
+++ b/src/features/milestones/Milestone.vue
@@ -74,12 +74,12 @@ export default defineComponent({
jsx(() => (
- {currDisplay.effectDisplay ? (
+ {currDisplay.effectDisplay != null ? (
) : null}
- {currDisplay.optionsDisplay ? (
+ {currDisplay.optionsDisplay != null ? (
diff --git a/src/features/milestones/milestone.tsx b/src/features/milestones/milestone.tsx
index e016e64..cb3e7c4 100644
--- a/src/features/milestones/milestone.tsx
+++ b/src/features/milestones/milestone.tsx
@@ -1,5 +1,11 @@
import Select from "components/fields/Select.vue";
-import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
+import type {
+ CoercableComponent,
+ GenericComponent,
+ OptionsFunc,
+ Replace,
+ StyleValue
+} from "features/feature";
import { Component, GatherProps, getUniqueID, jsx, setDefault, Visibility } from "features/feature";
import MilestoneComponent from "features/milestones/Milestone.vue";
import { globalBus } from "game/events";
@@ -92,7 +98,7 @@ export function createMilestone(
const genericMilestone = milestone as GenericMilestone;
earned.value = true;
genericMilestone.onComplete?.();
- if (genericMilestone.display && unref(genericMilestone.showPopups) === true) {
+ if (genericMilestone.display != null && unref(genericMilestone.showPopups) === true) {
const display = unref(genericMilestone.display);
const Display = coerceComponent(
isCoercableComponent(display) ? display : display.requirement
@@ -162,7 +168,10 @@ export function createMilestone(
) {
genericMilestone.earned.value = true;
genericMilestone.onComplete?.();
- if (genericMilestone.display && unref(genericMilestone.showPopups) === true) {
+ if (
+ genericMilestone.display != null &&
+ unref(genericMilestone.showPopups) === true
+ ) {
const display = unref(genericMilestone.display);
const Display = coerceComponent(
isCoercableComponent(display) ? display : display.requirement
diff --git a/src/features/reset.ts b/src/features/reset.ts
index 92cb506..487238c 100644
--- a/src/features/reset.ts
+++ b/src/features/reset.ts
@@ -43,7 +43,7 @@ export function createReset(
reset.reset = function () {
const handleObject = (obj: unknown) => {
- if (obj && typeof obj === "object") {
+ if (obj != null && typeof obj === "object") {
if (DefaultValue in obj) {
const persistent = obj as NonPersistent;
persistent.value = persistent[DefaultValue];
diff --git a/src/features/trees/tree.ts b/src/features/trees/tree.ts
index 3fbf935..0b36f74 100644
--- a/src/features/trees/tree.ts
+++ b/src/features/trees/tree.ts
@@ -88,7 +88,7 @@ export function createTreeNode(
if (treeNode.onClick) {
const onClick = treeNode.onClick.bind(treeNode);
treeNode.onClick = function () {
- if (unref(treeNode.canClick)) {
+ if (unref(treeNode.canClick) !== false) {
onClick();
}
};
@@ -96,7 +96,7 @@ export function createTreeNode(
if (treeNode.onHold) {
const onHold = treeNode.onHold.bind(treeNode);
treeNode.onHold = function () {
- if (unref(treeNode.canClick)) {
+ if (unref(treeNode.canClick) !== false) {
onHold();
}
};
diff --git a/src/features/upgrades/Upgrade.vue b/src/features/upgrades/Upgrade.vue
index dce37be..9723f44 100644
--- a/src/features/upgrades/Upgrade.vue
+++ b/src/features/upgrades/Upgrade.vue
@@ -96,13 +96,13 @@ export default defineComponent({
component.value = coerceComponent(
jsx(() => (
- {currDisplay.title ? (
+ {currDisplay.title != null ? (
) : null}
- {currDisplay.effectDisplay ? (
+ {currDisplay.effectDisplay != null ? (
Currently:
diff --git a/src/features/upgrades/upgrade.ts b/src/features/upgrades/upgrade.ts
index d60d9ea..1eb1d56 100644
--- a/src/features/upgrades/upgrade.ts
+++ b/src/features/upgrades/upgrade.ts
@@ -187,8 +187,11 @@ export function setupAutoPurchase(
autoActive: Computable,
upgrades: GenericUpgrade[] = []
): void {
- upgrades = upgrades || findFeatures(layer, UpgradeType);
- const isAutoActive = isFunction(autoActive) ? computed(autoActive) : autoActive;
+ upgrades =
+ upgrades.length === 0 ? (findFeatures(layer, UpgradeType) as GenericUpgrade[]) : upgrades;
+ const isAutoActive: ProcessedComputable = isFunction(autoActive)
+ ? computed(autoActive)
+ : autoActive;
layer.on("update", () => {
if (unref(isAutoActive)) {
upgrades.forEach(upgrade => upgrade.purchase());
diff --git a/src/game/modifiers.tsx b/src/game/modifiers.tsx
index a5cd416..4606671 100644
--- a/src/game/modifiers.tsx
+++ b/src/game/modifiers.tsx
@@ -78,7 +78,7 @@ export function createAdditiveModifier(
? undefined
: jsx(() => (
- {unref(processedDescription) ? (
+ {unref(processedDescription) != null ? (
{/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}
{renderJSX(unref(processedDescription)!)}
@@ -126,7 +126,7 @@ export function createMultiplicativeModifier (
- {unref(processedDescription) ? (
+ {unref(processedDescription) != null ? (
{/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}
{renderJSX(unref(processedDescription)!)}
@@ -195,7 +195,7 @@ export function createExponentialModifier(
? undefined
: jsx(() => (
- {unref(processedDescription) ? (
+ {unref(processedDescription) != null ? (
{/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}
{renderJSX(unref(processedDescription)!)}
diff --git a/src/game/persistence.ts b/src/game/persistence.ts
index 03f5dad..893d435 100644
--- a/src/game/persistence.ts
+++ b/src/game/persistence.ts
@@ -85,7 +85,7 @@ function getStackTrace() {
?.split("\n")
.slice(3, 5)
.map(line => line.trim())
- .join("\n") || ""
+ .join("\n") ?? ""
);
}
@@ -134,7 +134,7 @@ export function persistent(defaultValue: T | Ref): Persisten
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function isPersistent(value: any): value is Persistent {
- return value && typeof value === "object" && PersistentState in value;
+ return value != null && typeof value === "object" && PersistentState in value;
}
/**
@@ -168,7 +168,7 @@ globalBus.on("addLayer", (layer: GenericLayer, saveData: Record
let foundPersistent = false;
Object.keys(obj).forEach(key => {
let value = obj[key];
- if (value && typeof value === "object") {
+ if (value != null && typeof value === "object") {
if (ProxyState in value) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
value = (value as any)[ProxyState] as object;
diff --git a/src/game/player.ts b/src/game/player.ts
index e641904..3280caf 100644
--- a/src/game/player.ts
+++ b/src/game/player.ts
@@ -70,7 +70,7 @@ const state = reactive({
modVersion: "",
layers: {},
- autoPause: true,
+ autoPause: true
});
/** Convert a player save data object into a JSON string. Unwraps refs. */
diff --git a/src/game/settings.ts b/src/game/settings.ts
index a82c8a5..9595343 100644
--- a/src/game/settings.ts
+++ b/src/game/settings.ts
@@ -33,9 +33,9 @@ const state = reactive>({
showTPS: true,
theme: Themes.Nordic,
unthrottled: false,
-
+
usingLog: false,
- alignUnits: false,
+ alignUnits: false
});
watch(
@@ -68,9 +68,9 @@ export const hardResetSettings = (window.hardResetSettings = () => {
saves: [],
showTPS: true,
theme: Themes.Nordic,
-
+
usingLog: false,
- alignUnits: false,
+ alignUnits: false
};
globalBus.emit("loadSettings", settings);
Object.assign(state, settings);
diff --git a/src/util/bignum.ts b/src/util/bignum.ts
index 3c368d9..64bbeb2 100644
--- a/src/util/bignum.ts
+++ b/src/util/bignum.ts
@@ -33,7 +33,7 @@ declare global {
formatSmall: (x: DecimalSource, precision?: number) => string;
formatLimit: (list: [DecimalSource, string][], unit: string) => string;
invertOOM: (x: DecimalSource) => Decimal;
- formatGain: (x: DecimalSource) => string
+ formatGain: (x: DecimalSource) => string;
}
}
window.Decimal = Decimal;
@@ -47,6 +47,6 @@ window.toPlaces = toPlaces;
window.formatSmall = formatSmall;
window.formatLimit = formatLimit;
window.invertOOM = invertOOM;
-window.formatGain = formatGain
+window.formatGain = formatGain;
export default Decimal;
diff --git a/src/util/break_eternity.ts b/src/util/break_eternity.ts
index a794464..a3fc5aa 100644
--- a/src/util/break_eternity.ts
+++ b/src/util/break_eternity.ts
@@ -196,7 +196,11 @@ export function invertOOM(x: DecimalSource): Decimal {
return x;
}
-export function formatLimit(list: [DecimalSource, string][], unit: string, gainMultiplier: DecimalSource = Decimal.dOne): string {
+export function formatLimit(
+ list: [DecimalSource, string][],
+ unit: string,
+ gainMultiplier: DecimalSource = Decimal.dOne
+): string {
let num = list[0][0];
let str = list[0][1];
for (let i = 1; i < list.length; i++) {
diff --git a/src/util/proxies.ts b/src/util/proxies.ts
index a855dee..9dad138 100644
--- a/src/util/proxies.ts
+++ b/src/util/proxies.ts
@@ -39,7 +39,7 @@ export function createLazyProxy(
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const val = (calculateObj() as any)[key];
- if (val && typeof val === "object" && NonPersistent in val) {
+ if (val != null && typeof val === "object" && NonPersistent in val) {
return val[NonPersistent];
}
return val;
diff --git a/src/util/save.ts b/src/util/save.ts
index 8ddddad..31fb837 100644
--- a/src/util/save.ts
+++ b/src/util/save.ts
@@ -86,7 +86,7 @@ export function getUniqueID(): string {
i = 0;
do {
id = `${projInfo.id}-${i++}`;
- } while (localStorage.getItem(id));
+ } while (localStorage.getItem(id) != null);
return id;
}
@@ -107,7 +107,12 @@ export async function loadSave(playerObj: Partial): Promise {
getInitialLayers(playerObj).forEach(layer => addLayer(layer, playerObj));
playerObj = setupInitialStore(playerObj);
- if (playerObj.offlineProd && playerObj.time && playerObj.devSpeed !== 0) {
+ if (
+ playerObj.offlineProd &&
+ playerObj.time != null &&
+ playerObj.time &&
+ playerObj.devSpeed !== 0
+ ) {
if (playerObj.offlineTime == undefined) playerObj.offlineTime = 0;
playerObj.offlineTime += Math.min(
playerObj.offlineTime + (Date.now() - playerObj.time) / 1000,
diff --git a/src/util/vue.tsx b/src/util/vue.tsx
index 750672f..089b465 100644
--- a/src/util/vue.tsx
+++ b/src/util/vue.tsx
@@ -229,7 +229,10 @@ export function computeOptionalComponent(
const comp = shallowRef(null);
watchEffect(() => {
const currComponent = unwrapRef(component);
- comp.value = !currComponent ? null : coerceComponent(currComponent, defaultWrapper);
+ comp.value =
+ currComponent == "" || currComponent == null
+ ? null
+ : coerceComponent(currComponent, defaultWrapper);
});
return comp;
}