Skip to content

Commit 4b54a65

Browse files
committed
fix(core): no need to throw errors during server-side generate
1 parent dd9174b commit 4b54a65

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web-analytics/core",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Website pageview analytics tool for framework-free and multi-analytics-platform support.",
55
"author": "chengpeiquan <chengpeiquan@chengpeiquan.com>",
66
"license": "MIT",

packages/core/src/base.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ export class BaseAnalytics {
3333
* Smooth out the differences between different platforms
3434
*/
3535
private updatePlatformInfo() {
36-
if (!isBrowser) {
37-
this.throwError('Plugin only works in the browser.')
38-
return
39-
}
36+
if (!isBrowser) return
4037

4138
switch (this.platform) {
4239
case 'baidu': {

0 commit comments

Comments
 (0)