Skip to content

Commit

Permalink
Merge branch 'master' into component-children
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Oct 1, 2018
2 parents b03b7ea + b7038d1 commit 884cf7d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/preact.d.ts
Expand Up @@ -421,6 +421,7 @@ declare global {
interface DOMAttributes extends preact.PreactDOMAttributes {
// Image Events
onLoad?: GenericEventHandler;
onError?: GenericEventHandler;
onLoadCapture?: GenericEventHandler;

// Clipboard Events
Expand Down
2 changes: 1 addition & 1 deletion src/vdom/component.js
Expand Up @@ -189,7 +189,7 @@ export function renderComponent(component, renderMode, mountAll, isChild) {
}

if (!isUpdate || mountAll) {
mounts.unshift(component);
mounts.push(component);
}
else if (!skip) {
// Ensure that pending componentDidMount() hooks of child components
Expand Down
6 changes: 4 additions & 2 deletions src/vdom/diff.js
Expand Up @@ -24,11 +24,13 @@ let hydrating = false;

/** Invoke queued componentDidMount lifecycle methods */
export function flushMounts() {
let c;
while ((c=mounts.pop())) {
let c, i;
for (i=0; i<mounts.length; ++i) {
c = mounts[i];
if (options.afterMount) options.afterMount(c);
if (c.componentDidMount) c.componentDidMount();
}
mounts.length = 0;
}


Expand Down

0 comments on commit 884cf7d

Please sign in to comment.