Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/controller/js/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ const http = useHttp()
* @param { json } params {"event_type": design_error,"url": "elit in reprehenderit enim incididunt" }
* @returns { Promise }
*/
export const requestEvent = (url, params) => http.post(url, params).catch(() => {})
export const requestEvent = (url, params) => {
if (!url) {
return
}

return http.post(url, params).catch(() => {})
}

/**
* 页面更新
Expand Down
4 changes: 4 additions & 0 deletions packages/controller/js/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ const promiseMonitoring = () => {
*/

export const iframeMonitoring = () => {
if (!monitorUrl) {
Comment thread
rhlin marked this conversation as resolved.
return false
}

window.frames[0].onerror = function (errorMessage, scriptURI, lineNo, columnNo, error) {
requestEvent(monitorUrl, {
event_type: 'design_iframeError',
Expand Down