@shopify/react-html
Advanced tools
Comparing version 8.0.8 to 8.0.9
@@ -13,2 +13,8 @@ # Changelog | ||
## 8.0.9 - 2019-05-02 | ||
### Changed | ||
- Removed the `isServer` option from the constructor for `HtmlManager` [#682](https://github.com/Shopify/quilt/pull/682) | ||
## 8.0.6 - 2019-04-15 | ||
@@ -15,0 +21,0 @@ |
@@ -14,3 +14,2 @@ /// <reference types="react" /> | ||
effect: EffectKind; | ||
private isServer; | ||
private serializations; | ||
@@ -22,5 +21,2 @@ private titles; | ||
readonly state: State; | ||
constructor({ isServer }?: { | ||
isServer?: boolean | undefined; | ||
}); | ||
reset({ includeSerializations }?: { | ||
@@ -27,0 +23,0 @@ includeSerializations?: boolean | undefined; |
@@ -7,4 +7,3 @@ "use strict"; | ||
var HtmlManager = /** @class */ (function () { | ||
function HtmlManager(_a) { | ||
var _b = (_a === void 0 ? {} : _a).isServer, isServer = _b === void 0 ? typeof document === 'undefined' : _b; | ||
function HtmlManager() { | ||
var _this = this; | ||
@@ -20,3 +19,2 @@ this.effect = { | ||
this.subscriptions = new Set(); | ||
this.isServer = isServer; | ||
} | ||
@@ -47,5 +45,2 @@ Object.defineProperty(HtmlManager.prototype, "state", { | ||
var _this = this; | ||
if (this.isServer) { | ||
return function () { }; | ||
} | ||
this.subscriptions.add(subscription); | ||
@@ -73,5 +68,3 @@ return function () { | ||
HtmlManager.prototype.setSerialization = function (id, data) { | ||
if (this.isServer) { | ||
this.serializations.set(id, data); | ||
} | ||
this.serializations.set(id, data); | ||
}; | ||
@@ -78,0 +71,0 @@ HtmlManager.prototype.getSerialization = function (id) { |
{ | ||
"name": "@shopify/react-html", | ||
"version": "8.0.8", | ||
"version": "8.0.9", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A component to render your react app with no static HTML.", |
@@ -26,3 +26,2 @@ import {EffectKind} from '@shopify/react-effect'; | ||
private isServer: boolean; | ||
private serializations = getSerializationsFromDocument(); | ||
@@ -44,6 +43,2 @@ private titles: Title[] = []; | ||
constructor({isServer = typeof document === 'undefined'} = {}) { | ||
this.isServer = isServer; | ||
} | ||
reset({includeSerializations = false} = {}) { | ||
@@ -61,6 +56,2 @@ this.titles = []; | ||
subscribe(subscription: Subscription) { | ||
if (this.isServer) { | ||
return () => {}; | ||
} | ||
this.subscriptions.add(subscription); | ||
@@ -92,5 +83,3 @@ return () => { | ||
setSerialization(id: string, data: unknown) { | ||
if (this.isServer) { | ||
this.serializations.set(id, data); | ||
} | ||
this.serializations.set(id, data); | ||
} | ||
@@ -97,0 +86,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98247
2083