only post if target exists

This commit is contained in:
j 2023-07-21 11:21:30 +01:00
parent 4189c740b5
commit f8b218ec59

View file

@ -438,7 +438,7 @@
Ox.forEach(
Ox.makeObject(Ox.slice(arguments)),
function(data, event) {
target.postMessage(JSON.stringify({
target && target.postMessage(JSON.stringify({
data: data,
event: event,
target: isParent ? Ox.oxid : null