Skip to content

Commit 779fdfd

Browse files
Gcaufyfengmk2
andauthored
fix: fixed show all frame (#32)
当 active frame 是 native frame 时, 再关闭 show all frame 时, 并未重置 active frame. Co-authored-by: fengmk2 <suqian.yf@antgroup.com>
1 parent d386c17 commit 779fdfd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/onerror_page.mustache

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,13 @@ Prism.languages.typescript=Prism.languages.extend("javascript",{keyword:/\b(as|a
707707
$$('.frame-row.native-frame').forEach(function(node) {
708708
node.classList.remove('force-show');
709709
});
710+
var activeFrame = $('.frame-row.active');
711+
if (activeFrame.classList.contains('native-frame')) {
712+
activeFrame.classList.remove('active');
713+
var firstFrame = $$('.frame-row')[0];
714+
firstFrame.classList.add('active');
715+
showFrameContext(firstFrame);
716+
}
710717
}
711718
}
712719
function displayFirstView () {
@@ -751,4 +758,4 @@ Prism.languages.typescript=Prism.languages.extend("javascript",{keyword:/\b(as|a
751758
</script>
752759
</section>
753760
</body>
754-
</html>
761+
</html>

0 commit comments

Comments
 (0)