mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: correctly check for hasData in admin-report (#31197)
Using length is not working on javascript objects and this would always be falsey. ``` const test = { foo: 1 }; test.length // undefined ```
This commit is contained in:
@@ -156,7 +156,7 @@ export default class AdminReport extends Component {
|
||||
}
|
||||
|
||||
get hasData() {
|
||||
return this.model?.data?.length > 0;
|
||||
return isPresent(this.model?.data);
|
||||
}
|
||||
|
||||
get disabledLabel() {
|
||||
|
Reference in New Issue
Block a user