Skip to content

Commit

Permalink
v5.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed May 29, 2024
1 parent c907aa8 commit 26098a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netdata/charts",
"version": "5.0.18",
"version": "5.0.19",
"description": "Netdata frontend SDK and chart utilities",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/helpers/units/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ const findCurly = u => {
export const getAlias = u => allUnits.aliases[u] || (allUnits.units[u] ? u : findCurly(u))

export const isScalable = (u = "") =>
typeof u === "string" ? getUnitConfig(u).is_scalable : u.is_scalable
typeof u === "string" ? getUnitConfig(u)?.is_scalable : u?.is_scalable
export const isMetric = (u = "") =>
typeof u === "string" ? getUnitConfig(u).is_metric : u.is_metric
typeof u === "string" ? getUnitConfig(u)?.is_metric : u?.is_metric
export const isBinary = (u = "") =>
typeof u === "string" ? getUnitConfig(u).is_binary : u.is_binary
export const isBit = (u = "") => (typeof u === "string" ? getUnitConfig(u).is_bit : u.is_bit)
typeof u === "string" ? getUnitConfig(u)?.is_binary : u?.is_binary
export const isBit = (u = "") => (typeof u === "string" ? getUnitConfig(u)?.is_bit : u?.is_bit)

export const getScales = u => {
if (!isScalable(u)) return [[], {}]
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/makeChart/camelizePayload.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const getStsByContext = (groups, units, dimensions, contextsArray) => {
}, "")
)

if (!dimensions.ids) {
if (!dimensions?.ids) {
return [[], {}]
}

Expand Down

0 comments on commit 26098a1

Please sign in to comment.