Skip to content

Commit 2b5c82b

Browse files
committed
Merge remote-tracking branch 'origin/compare-transition-timerange-bug-fixes' into compare-transition-timerange-bug-fixes
2 parents 98a20e9 + aa43623 commit 2b5c82b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

ui/packages/shared/components/src/hooks/URLState/index.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ export const useURLState = <T extends ParamValue>(
252252
if (typeof state[param] === 'string') {
253253
if (alwaysReturnArray === true) {
254254
if (debugLog === true) {
255-
console.log('useURLState returning single string value as array for param', param, [state[param]]);
255+
console.log('useURLState returning single string value as array for param', param, [
256+
state[param],
257+
]);
256258
}
257259
return [state[param]] as ParamValue;
258260
}
@@ -263,7 +265,11 @@ export const useURLState = <T extends ParamValue>(
263265
} else if (state[param] != null && Array.isArray(state[param])) {
264266
if (state[param]?.length === 1 && alwaysReturnArray !== true) {
265267
if (debugLog === true) {
266-
console.log('useURLState returning first array value as string for param', param, state[param][0]);
268+
console.log(
269+
'useURLState returning first array value as string for param',
270+
param,
271+
state[param][0]
272+
);
267273
}
268274
return state[param]?.[0] as ParamValue;
269275
} else {
@@ -277,7 +283,12 @@ export const useURLState = <T extends ParamValue>(
277283

278284
if (value == null) {
279285
if (debugLog === true) {
280-
console.log('useURLState returning defaultValue for param', param, defaultValue, window.location.href);
286+
console.log(
287+
'useURLState returning defaultValue for param',
288+
param,
289+
defaultValue,
290+
window.location.href
291+
);
281292
}
282293
}
283294

ui/packages/shared/profile/src/hooks/useQueryState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import {Query} from '@parca/parser';
1818

1919
import {QuerySelection} from '../ProfileSelector';
2020
import {ProfileSelection, ProfileSelectionFromParams, ProfileSource} from '../ProfileSource';
21+
import {useResetFlameGraphState} from '../ProfileView/hooks/useResetFlameGraphState';
2122
import {sumByToParam, useSumBy, useSumByFromParams} from '../useSumBy';
22-
import { useResetFlameGraphState } from '../ProfileView/hooks/useResetFlameGraphState';
2323

2424
interface UseQueryStateOptions {
2525
suffix?: '_a' | '_b'; // For comparison mode

0 commit comments

Comments
 (0)