diff --git a/src/components/PacketSniffer.vue b/src/components/PacketSniffer.vue
index b49b6eb..fcd5ea6 100644
--- a/src/components/PacketSniffer.vue
+++ b/src/components/PacketSniffer.vue
@@ -7,9 +7,13 @@ import { Filter } from '@element-plus/icons-vue'
const filterRules = ref()
-function filterFunc(pkt: Packet) {
+function filterFunc(pkt: Packet): boolean {
if (filterRules.value == undefined) return true
- return eval(filterRules.value)
+ try {
+ return eval(filterRules.value)
+ } catch (error) {
+ return pkt != undefined
+ }
}
const columns: any = [
@@ -111,7 +115,7 @@ Row.inheritAttrs = false
diff --git a/src/components/TopoEditToolbox.vue b/src/components/TopoEditToolbox.vue
index 60764d4..9e147fe 100644
--- a/src/components/TopoEditToolbox.vue
+++ b/src/components/TopoEditToolbox.vue
@@ -1,7 +1,7 @@
-
-
+
+
Load:
-
+
@@ -87,8 +87,8 @@ const exportTopo = () => {
Connect:
-
-
+
+