mockaton 8.20.3 → 8.20.4
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.
- package/package.json +1 -1
- package/src/Api.js +1 -1
- package/src/Dashboard.js +7 -6
- package/src/staticCollection.js +1 -1
package/package.json
CHANGED
package/src/Api.js
CHANGED
package/src/Dashboard.js
CHANGED
|
@@ -597,8 +597,8 @@ async function previewMock(method, urlMask, href) {
|
|
|
597
597
|
previewMock.controller?.abort()
|
|
598
598
|
previewMock.controller = new AbortController
|
|
599
599
|
|
|
600
|
-
renderProgressBar()
|
|
601
600
|
payloadViewerTitleRef.current.replaceChildren(r('span', null, Strings.fetching))
|
|
601
|
+
payloadViewerRef.current.replaceChildren(PayloadViewerProgressBar())
|
|
602
602
|
|
|
603
603
|
try {
|
|
604
604
|
const response = await fetch(href, {
|
|
@@ -607,10 +607,9 @@ async function previewMock(method, urlMask, href) {
|
|
|
607
607
|
})
|
|
608
608
|
await updatePayloadViewer(method, urlMask, response)
|
|
609
609
|
}
|
|
610
|
-
catch {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
payloadViewerRef.current.replaceChildren(PayloadViewerProgressBar())
|
|
610
|
+
catch (err) {
|
|
611
|
+
onError(err)
|
|
612
|
+
payloadViewerRef.current.replaceChildren()
|
|
614
613
|
}
|
|
615
614
|
}
|
|
616
615
|
|
|
@@ -755,7 +754,9 @@ async function poll() {
|
|
|
755
754
|
/** # Utils */
|
|
756
755
|
|
|
757
756
|
function className(...args) {
|
|
758
|
-
return {
|
|
757
|
+
return {
|
|
758
|
+
className: args.filter(Boolean).join(' ')
|
|
759
|
+
}
|
|
759
760
|
}
|
|
760
761
|
|
|
761
762
|
|
package/src/staticCollection.js
CHANGED