Skip to content

Commit bf5bd2a

Browse files
committed
fix(dom-adapter): add fake implementation for getUserAgent
caused by angular/angular#15256 fixes #831
1 parent 4521c7c commit bf5bd2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: nativescript-angular/dom-adapter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class NativeScriptDomAdapter implements ɵDomAdapter {
167167
getLocation(): Location { throw new Error("Not implemented!") }
168168
getBaseHref(): string { throw new Error("Not implemented!") }
169169
resetBaseElement(): void { throw new Error("Not implemented!") }
170-
getUserAgent(): string { throw new Error("Not implemented!") }
170+
getUserAgent(): string { return "Fake user agent"; }
171171
setData(_element: any /** TODO #9100 */, _name: string, _value: string): any
172172
/** TODO #9100 */ { throw new Error("Not implemented!") }
173173
getComputedStyle(_element: any /** TODO #9100 */): any { throw new Error("Not implemented!") }
@@ -179,7 +179,7 @@ export class NativeScriptDomAdapter implements ɵDomAdapter {
179179
getTransitionEnd(): string { throw new Error("Not implemented!") }
180180
supportsAnimation(): boolean { throw new Error("Not implemented!") }
181181

182-
supportsCookies(): boolean { throw new Error("Not implemented!") }
182+
supportsCookies(): boolean { return false; }
183183
getCookie(_name: string): string { throw new Error("Not implemented!") }
184184
setCookie(_name: string, _value: string): any /** TODO #9100 */ { throw new Error("Not implemented!") }
185185
}

0 commit comments

Comments
 (0)