Skip to content

Commit

Permalink
Merge pull request #2726 from LibreSign/fix/refresh-signature-preview
Browse files Browse the repository at this point in the history
fix: refresh signature preview
  • Loading branch information
vitormattos authored Apr 12, 2024
2 parents fc6735a + 3f96205 commit 7e6fcf9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/views/Account/partials/Signature.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import DeleteIcon from 'vue-material-design-icons/Delete.vue'
import DrawIcon from 'vue-material-design-icons/Draw.vue'
import PreviewSignature from '../../../Components/PreviewSignature/PreviewSignature.vue'
import { startsWith } from 'lodash-es'
import Draw from '../../../Components/Draw/Draw.vue'
import { showError, showSuccess } from '@nextcloud/dialogs'
import { useSignatureElementsStore } from '../../../store/signatureElements.js'
Expand Down Expand Up @@ -74,7 +73,7 @@ export default {
return this.signatureElementsStore.hasSignatureOfType(this.type)
},
imgSrc() {
if (startsWith('data:', this.signatureElementsStore.signs[this.type].value)) {
if (this.signatureElementsStore.signs[this.type]?.value?.startsWith('data:')) {
return this.signatureElementsStore.signs[this.type].value
}
return `${this.signatureElementsStore.signs[this.type].file.url}&_t=${Date.now()}`
Expand Down

0 comments on commit 7e6fcf9

Please sign in to comment.