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,13 +185,20 @@ 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() {
189
- var _a, _b;
196
+ var _a;
197
+ let userRoleName = [];
190
198
  for (let i = 0; i < this.userRole.length; ++i) {
191
- const roleName = [];
192
- roleName.push((_a = this.userRole[i]) === null || _a === void 0 ? void 0 : _a.name);
193
- return (_b = this.userRole[i]) === null || _b === void 0 ? void 0 : _b.name;
199
+ userRoleName.push((_a = this.userRole[i]) === null || _a === void 0 ? void 0 : _a.name);
194
200
  }
201
+ return userRoleName;
195
202
  }
196
203
  addClickListenerToImages() {
197
204
  const editor = document.getElementById('editor');