fix: resolve content page editor JS errors and vendor dropdown

- Escape hyphen in regex pattern to fix Firefox regexp validation error
- Fix vendor API response parsing (use data.vendors instead of data.items)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-28 21:07:27 +01:00
parent db4c255178
commit efc2fd209a
2 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ function contentPageEditor(pageId) {
contentPageEditLog.info('Loading vendors...');
const response = await apiClient.get('/admin/vendors?is_active=true&limit=100');
const data = response.data || response;
this.vendors = data.items || data || [];
this.vendors = data.vendors || data.items || data || [];
contentPageEditLog.info(`Loaded ${this.vendors.length} vendors`);
} catch (err) {
contentPageEditLog.error('Error loading vendors:', err);