Skip to content

Commit cc56cf8

Browse files
change default
1 parent bde5f64 commit cc56cf8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/oc-client.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export function createOc(oc) {
5252
let RETRY_SEND_NUMBER = ocConf.retrySendNumber || true;
5353
let POLLING_INTERVAL = ocConf.pollingInterval || 500;
5454
let OC_TAG = ocConf.tag || "oc-component";
55-
let MANAGE_LIFECYCLES = isBool(ocConf.manageLifecycles)
56-
? ocConf.manageLifecycles
55+
let DISABLE_LIFECYCLES = isBool(ocConf.disableLifecycles)
56+
? ocConf.disableLifecycles
5757
: false;
5858
let MESSAGES_ERRORS_HREF_MISSING = "Href parameter missing";
5959
let MESSAGES_ERRORS_RETRY_FAILED =
@@ -678,15 +678,16 @@ export function createOc(oc) {
678678
OC_TAG,
679679
class extends HTMLElement {
680680
#connected = false;
681-
#manageLifecycle = false;
681+
#manageLifecycle = !DISABLE_LIFECYCLES;
682682
constructor() {
683683
super();
684684
if (
685-
MANAGE_LIFECYCLES ||
686-
this.getAttribute("manage-lifecycle") == "true" ||
687-
this.getAttribute("manage-lifecycle") == ""
685+
this.getAttribute("disable-lifecycle") == "true" ||
686+
this.getAttribute("disable-lifecycle") == ""
688687
) {
689688
this.#manageLifecycle = true;
689+
} else if (this.getAttribute("disable-lifecycle") == "false") {
690+
this.#manageLifecycle = false;
690691
}
691692
}
692693

0 commit comments

Comments
 (0)