Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-toolbar

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-toolbar - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5-0

24

dist/backbone-toolbar.js

@@ -289,5 +289,14 @@ (function webpackUniversalModuleDefinition(root, factory) {

value: function get(id) {
return _underscore2.default.chain(this._contexts).result(id).result('item').value();
return _underscore2.default.chain(this._contexts).result(id || this.rootId).result('item').value();
}
}, {
key: 'set',
value: function set(id, options) {
var item = _underscore2.default.isFunction(options) ? options(this.get(id)) : item;
this.update(_underscore2.default.defaults({
id: id || this.rootId
}, item));
}
}, {
key: 'update',

@@ -297,7 +306,7 @@ value: function update(item) {

var id = item.id || this._root.id;
var id = item.id || this.rootId;
var itemNew = _underscore2.default.defaults({ id: id }, item, this.get(id));
if (id === this._root.id) {
if (!itemNew.type !== 'toolbar') {
if (id === this.rootId) {
if (itemNew.type !== 'toolbar') {
throw new Error('The root item must be a toolbar');

@@ -331,6 +340,11 @@ }

this.undelegateEvents();
this.$el.html(this._contexts[this._root.id].html);
this.$el.html(this._contexts[this.rootId].html);
this.delegateEvents();
return this;
}
}, {
key: 'rootId',
get: function get() {
return this._root.id;
}
}]);

@@ -337,0 +351,0 @@

{
"main": "dist/backbone-toolbar.js",
"version": "0.0.4",
"version": "0.0.5-0",
"files": [

@@ -5,0 +5,0 @@ "dist"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc