Skip to content

Commit afc1566

Browse files
committed
refactor: simplify getTarget method in Up class (#1)
1 parent eff6a6e commit afc1566

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

providers/unpoly/up.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,7 @@ export default class Up {
8888
}
8989

9090
getTarget() {
91-
return this.getProperty('X-Up-Target') || 'body'
92-
}
93-
94-
targetIncludes(selector: string): boolean {
95-
const target = this.getTarget()
96-
.split(',')
97-
.map((value) => value.trim())
98-
return target.includes('body') ? true : target.includes(selector)
91+
return this.getProperty('X-Up-Target')
9992
}
10093

10194
getTitle() {

0 commit comments

Comments
 (0)