Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also copy function properties while wrapping function #130

Merged
merged 3 commits into from
Aug 24, 2013

Conversation

Stereobit
Copy link
Contributor

Hey, I had some problems with wrapping define and require by require.js lately. Internally require.js sets:

define.amd = {
  jQuery: true
};

When wrapping the function this property gets not copied which caused some problems because it's very common to check for it to define AMD modules when available. Even jQuery itself does it:

if ( typeof define === "function" && define.amd ) {
    define( "jquery", [], function () { return jQuery; } );
}

I'm not sure if my way of just copying the properties is the best way but I'm open for suggestions.

};

for (property in func) {
wrappedFunction[property] = func[property];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't you want to check the hasOwnProperty thing here before doing this?

Like: func.hasOwnProperty(property) && wrappedFunction[property] = func[property];

@mattrobenolt
Copy link
Contributor

lgtm

mattrobenolt added a commit that referenced this pull request Aug 24, 2013
Also copy function properties while wrapping function
@mattrobenolt mattrobenolt merged commit 28576e2 into getsentry:master Aug 24, 2013
billyvg added a commit that referenced this pull request Dec 12, 2023
> * Revert "fix: isCheckout is not included in fullsnapshot event (rrweb-io#1141)"

Fixes an issue where Meta event is being lost in buffered replays.

> revert: feat: Remove plugins related code, which is not used #123
> feat: Export additional canvas-related types and functions (#134)

Changes needed for canvas playback

> feat: Skip addHoverClass when stylesheet is >= 1MB #130

Affects playback only
billyvg added a commit that referenced this pull request Dec 12, 2023
> * Revert "fix: isCheckout is not included in fullsnapshot event
(rrweb-io#1141)"

Fixes an issue where Meta event is being lost in buffered replays.

> revert: feat: Remove plugins related code, which is not used #123
> feat: Export additional canvas-related types and functions (#134)

Changes needed for canvas playback

> feat: Skip addHoverClass when stylesheet is >= 1MB #130

Affects playback only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants