Skip to content

Commit

Permalink
check field runtimeStats to prevent accessing undefined properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ahouzheng authored and highker committed Feb 23, 2022
1 parent 2fb2c31 commit 5edaef8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion presto-main/src/main/resources/webapp/dist/query.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ export class QueryDetail extends React.Component {

renderRuntimeStats() {
const query = this.state.query;
if (query.queryStats.runtimeStats === undefined) return null;
if (Object.values(query.queryStats.runtimeStats).length == 0) return null;
return (
<div className="row">
Expand Down

0 comments on commit 5edaef8

Please sign in to comment.