Skip to content

Commit

Permalink
fix: refresh signature preview
Browse files Browse the repository at this point in the history
After edit or create, the signature preview need to be updated.

Removed reference to 'lodash-es'

Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Apr 12, 2024
1 parent fc6735a commit 3f96205
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 3f96205

Please sign in to comment.