Skip to content

Commit

Permalink
Fix warning when there is no qgisProject set
Browse files Browse the repository at this point in the history
```
qrc:/qml/QFieldLocalDataPickerScreen.qml:332: TypeError: Cannot read property 'fileName' of null
```
  • Loading branch information
suricactus committed Nov 13, 2023
1 parent cc90d77 commit 3213a2f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qml/QFieldLocalDataPickerScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,10 @@ Page {
round: true

// Since the project menu only has one action for now, hide if PlatformUtilities.UpdateProjectFromArchive is missing
property bool isLocalProject: QFieldCloudUtils.getProjectId(qgisProject.fileName) === '' &&
(projectInfo.filePath.endsWith('.qgs') || projectInfo.filePath.endsWith('.qgz')) &&
platformUtilities.capabilities & PlatformUtilities.UpdateProjectFromArchive
property bool isLocalProject: qgisProject
&& QFieldCloudUtils.getProjectId(qgisProject.fileName) === ''
&& (projectInfo.filePath.endsWith('.qgs') || projectInfo.filePath.endsWith('.qgz'))
&& platformUtilities.capabilities & PlatformUtilities.UpdateProjectFromArchive
visible: (projectFolderView && isLocalProject && table.model.currentDepth === 1) || table.model.currentPath === 'root'

anchors.bottom: parent.bottom
Expand Down

0 comments on commit 3213a2f

Please sign in to comment.