Browse Source

Add `install` recipe as alias to `build` and `dist`

JC Brand 5 years ago
parent
commit
d9c41f62cf
2 changed files with 6 additions and 3 deletions
  1. 3 1
      Makefile
  2. 3 2
      src/headless/converse-core.js

+ 3 - 1
Makefile

@@ -174,7 +174,6 @@ logo/conversejs-filled%.png:: logo/conversejs-filled.svg
 src/headless/dist/converse-headless.min.js: src webpack.common.js node_modules @converse/headless
 src/headless/dist/converse-headless.min.js: src webpack.common.js node_modules @converse/headless
 	npm run headless
 	npm run headless
 
 
-
 .PHONY: dist
 .PHONY: dist
 dist:: build
 dist:: build
 
 
@@ -182,6 +181,9 @@ dist:: build
 build:: node_modules
 build:: node_modules
 	npm run dev && npm run build && make dist/website.css && make dist/website.min.css
 	npm run dev && npm run build && make dist/website.css && make dist/website.min.css
 
 
+.PHONY: install
+install:: build
+
 .PHONY: cdn
 .PHONY: cdn
 cdn:: node_modules
 cdn:: node_modules
 	npm run cdn
 	npm run cdn

+ 3 - 2
src/headless/converse-core.js

@@ -886,8 +886,9 @@ export const api = _converse.api = {
             promise = new Promise((resolve, reject) => _converse.connection.sendIQ(stanza, resolve, reject, timeout));
             promise = new Promise((resolve, reject) => _converse.connection.sendIQ(stanza, resolve, reject, timeout));
             promise.catch(e => {
             promise.catch(e => {
                 if (e === null) {
                 if (e === null) {
-                    const el = isElement(stanza) ? stanza : stanza.nodeTree;
-                    throw new TimeoutError(`Timeout error after ${timeout}ms for the following IQ stanza: ${el}`);
+                    throw new TimeoutError(
+                        `Timeout error after ${timeout}ms for the following IQ stanza: ${Strophe.serialize(stanza)}`
+                    );
                 }
                 }
             });
             });
         } else {
         } else {