isomorphic-style-loader icon indicating copy to clipboard operation
isomorphic-style-loader copied to clipboard

useStyles enhancement

Open jameswhf opened this issue 3 years ago • 2 comments

jameswhf avatar Aug 19 '21 08:08 jameswhf

@dazlious hello there! Any progress on this PR? This isBrowser check seems to always return undefined. If you take a look at dist/useStyles you'll see that this is transpiled into var _this = undefined and is never assigned with actual value:

// version 5.3.2
var _this = undefined;

var isBrowser = function () {
  // _this is undefined, so isBrowser() always returns undefined 
  return _this && typeof _this.window === 'object';
}();

https://github.com/kriasoft/isomorphic-style-loader/pull/198/files#diff-78c41e68a949b765a2709713f56f0f5e6542ffe54315f44719e44c413c0fc2e2L16

I would really appreciate if you could merge this PR since it fixes issue described above

DenysIvko avatar Jan 04 '22 14:01 DenysIvko

@dazlious hello there! Any progress on this PR? This isBrowser check seems to always return undefined. If you take a look at dist/useStyles you'll see that this is transpiled into var _this = undefined and is never assigned with actual value:

// version 5.3.2
var _this = undefined;

var isBrowser = function () {
  // _this is undefined, so isBrowser() always returns undefined 
  return _this && typeof _this.window === 'object';
}();

https://github.com/kriasoft/isomorphic-style-loader/pull/198/files#diff-78c41e68a949b765a2709713f56f0f5e6542ffe54315f44719e44c413c0fc2e2L16

I would really appreciate if you could merge this PR since it fixes issue described above

Still waiting for a reply here: https://github.com/kriasoft/isomorphic-style-loader/pull/198#discussion_r786649814

dazlious avatar Jul 09 '24 12:07 dazlious