@@ -772,21 +772,13 @@ export default {
772772 handler (newData , oldData ) {
773773 if (newData === oldData) return
774774 this .newResource = newData
775- this .resourceType = this .$route .meta .resourceType
776775 this .showKeys = false
777776 this .setData ()
778777
779- if (this .tagsSupportingResourceTypes .includes (this .resourceType )) {
780- if (' tags' in this .resource ) {
781- this .tags = this .resource .tags
782- } else if (this .resourceType ) {
783- this .getTags ()
784- }
785- }
786778 if (' apikey' in this .resource ) {
787779 this .getUserKeys ()
788780 }
789- this .getIcons ()
781+ this .updateResourceAdditionalData ()
790782 }
791783 },
792784 async templateIcon () {
@@ -798,7 +790,7 @@ export default {
798790 eventBus .on (' handle-close' , (showModal ) => {
799791 this .showUploadModal (showModal)
800792 })
801- this .getIcons ()
793+ this .updateResourceAdditionalData ()
802794 },
803795 computed: {
804796 tagsSupportingResourceTypes () {
@@ -834,6 +826,18 @@ export default {
834826 }
835827 },
836828 methods: {
829+ updateResourceAdditionalData () {
830+ if (! this .resource ) return
831+ this .resourceType = this .$route .meta .resourceType
832+ if (this .tagsSupportingResourceTypes .includes (this .resourceType )) {
833+ if (' tags' in this .resource ) {
834+ this .tags = this .resource .tags
835+ } else if (this .resourceType ) {
836+ this .getTags ()
837+ }
838+ }
839+ this .getIcons ()
840+ },
837841 showUploadModal (show ) {
838842 if (show) {
839843 if (this .$showIcon ()) {
0 commit comments