@jetbrains/ring-ui 6.0.31 → 6.0.33
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.
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import ExtendableError from 'es6-error';
|
|
2
2
|
export declare const defaultFetchConfig: RequestInit;
|
|
3
|
-
export
|
|
4
|
-
error?: string;
|
|
5
|
-
}
|
|
3
|
+
export type HTTPErrorData = Record<string, unknown>;
|
|
6
4
|
export declare class HTTPError extends ExtendableError {
|
|
7
5
|
data: HTTPErrorData;
|
|
8
6
|
status: number | undefined;
|
package/components/http/http.js
CHANGED
|
@@ -147,7 +147,7 @@ export default class HTTP {
|
|
|
147
147
|
if (!(error instanceof HTTPError)) {
|
|
148
148
|
throw error;
|
|
149
149
|
}
|
|
150
|
-
const shouldRefreshToken = error.data.error
|
|
150
|
+
const shouldRefreshToken = typeof error.data.error === 'string'
|
|
151
151
|
? this.shouldRefreshToken?.(error.data.error)
|
|
152
152
|
: false;
|
|
153
153
|
if (shouldRefreshToken) {
|
|
@@ -36,6 +36,7 @@ export default class PopupMenu extends Popup {
|
|
|
36
36
|
PopupMenu.propTypes = {
|
|
37
37
|
...popupPropTypes,
|
|
38
38
|
...List.propTypes,
|
|
39
|
+
maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
39
40
|
closeOnSelect: PropTypes.bool
|
|
40
41
|
};
|
|
41
42
|
export const { ListProps } = List;
|