Skip to content

Commit

Permalink
fix: clear outlet before rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ducksoupdev committed Oct 6, 2020
1 parent ee9b9f6 commit 74e5a2d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.1] - 2020-10-06

### Fixed
- Ensure an outlet is clear before rendering contents

## [1.1.0] - 2020-09-30

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ficusjs-router",
"version": "1.1.0",
"version": "1.1.1",
"description": "Lightweight standalone client-side router that supports history and hash routing",
"main": "dist/router.js",
"module": "dist/router.js",
Expand Down
2 changes: 2 additions & 0 deletions src/util/render-outlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
import { elementFromString } from './element-from-string.js'
import { isElement } from './is-element.js'
import { elementEmpty } from './element-empty.js'

export function renderOutlet (what, where) {
// check for an outlet
Expand All @@ -27,6 +28,7 @@ export function renderOutlet (what, where) {
}
}

elementEmpty(outlet)
outlet.appendChild(element)

// set the data attribute so we can clear the outlet later
Expand Down

0 comments on commit 74e5a2d

Please sign in to comment.