el-text-editor 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -185,12 +185,19 @@ class ElTextEditorComponent {
185
185
  getUserRoles() {
186
186
  this.userRole = this.UserRole;
187
187
  }
188
+ // roleCheck() {
189
+ // for (let i = 0; i < this.userRole.length; ++i) {
190
+ // const roleName = []
191
+ // roleName.push(this.userRole[i]?.name);
192
+ // return this.userRole[i]?.name;
193
+ // }
194
+ // }
188
195
  roleCheck() {
196
+ let userRoleName = [];
189
197
  for (let i = 0; i < this.userRole.length; ++i) {
190
- const roleName = [];
191
- roleName.push(this.userRole[i]?.name);
192
- return this.userRole[i]?.name;
198
+ userRoleName.push(this.userRole[i]?.name);
193
199
  }
200
+ return userRoleName;
194
201
  }
195
202
  addClickListenerToImages() {
196
203
  const editor = document.getElementById('editor');