mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 10:34:18 +00:00
excluded forbidden
This commit is contained in:
parent
48fea3bc18
commit
bd56ca6595
@ -1,5 +1,9 @@
|
|||||||
import lodash from "lodash"
|
import lodash from "lodash"
|
||||||
|
|
||||||
|
const forbidden = [
|
||||||
|
"libraries"
|
||||||
|
]
|
||||||
|
|
||||||
export default (event, data) => {
|
export default (event, data) => {
|
||||||
function serializeIpc(data) {
|
function serializeIpc(data) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@ -10,6 +14,10 @@ export default (event, data) => {
|
|||||||
|
|
||||||
if (!Array.isArray(copy)) {
|
if (!Array.isArray(copy)) {
|
||||||
Object.keys(copy).forEach((key) => {
|
Object.keys(copy).forEach((key) => {
|
||||||
|
if (forbidden.includes(key)) {
|
||||||
|
delete copy[key]
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof copy[key] === "function") {
|
if (typeof copy[key] === "function") {
|
||||||
delete copy[key]
|
delete copy[key]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user