@lvce-editor/editor-worker 19.30.2 → 19.30.3

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.
@@ -11172,6 +11172,19 @@ const HandleScrollBarVerticalPointerUp = 32;
11172
11172
  const HandleWheel = 33;
11173
11173
  const HandleKeyUp = 34;
11174
11174
 
11175
+ const getDiagnosticHoverDetail = ({
11176
+ code,
11177
+ source
11178
+ }) => {
11179
+ if (code === undefined) {
11180
+ return source || '';
11181
+ }
11182
+ if (!source) {
11183
+ return String(code);
11184
+ }
11185
+ return `${source} (${code})`;
11186
+ };
11187
+
11175
11188
  const Div = 4;
11176
11189
  const Input = 6;
11177
11190
  const Span = 8;
@@ -11252,7 +11265,7 @@ const getHoverVirtualDom = (lineInfos, documentation, diagnostics) => {
11252
11265
  type: Div
11253
11266
  });
11254
11267
  for (const diagnostic of diagnostics) {
11255
- dom.push(hoverProblemMessage, text(diagnostic.message), hoverProblemDetail, text(`${diagnostic.source} (${diagnostic.code})`));
11268
+ dom.push(hoverProblemMessage, text(diagnostic.message), hoverProblemDetail, text(getDiagnosticHoverDetail(diagnostic)));
11256
11269
  }
11257
11270
  }
11258
11271
  if (lineInfos.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.30.2",
3
+ "version": "19.30.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"