Skip to content
Snippets Groups Projects
Unverified Commit b6f4e893 authored by David Witter's avatar David Witter Committed by GitHub
Browse files

Merge pull request #25 from myuw-web-components/safety

make references safer in lifecycle hooks
parents 73c2fc99 5d99c943
No related branches found
No related tags found
No related merge requests found
# myuw-profile versions
## 1.3.2
### Fixed
* Check for valid references before messing with DOM elements/variables
## 1.3.0
### Added
......
This diff is collapsed.
......@@ -19,12 +19,14 @@ class MyUWProfile extends HTMLElement {
];
}
attributeChangedCallback(name, oldValue, newValue){
attributeChangedCallback(name, oldValue, newValue) {
if (typeof this.$circle !== 'undefined' && typeof this[name] !== 'undefined' && this[name] !== null) {
// Update the attribute internally
this[name] = newValue;
// Update the component with new att value
this.updateAttribute(name);
}
}
connectedCallback(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment